diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml
deleted file mode 100644
index 2e5bf99ab..000000000
--- a/.github/workflows/push.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: on-push
-on: push
-jobs:
- test:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Build the stack
- run: |
- git submodule update --init --recursive
- docker-compose up -d
- - name: Test
- env:
- GN_INSTANCE_FOLDER: /tmp/gradio-node-instance
- GN_CONTAINER_NAME: gradido-node-build
- run: docker run gradido-node-test
- timeout-minutes: 2
-
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index e8dfbab4e..56dc42be7 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -4,34 +4,13 @@ name: gradido test CI
on: [push]
jobs:
- ##############################################################################
- # JOB: PREPARE #####################################################
- ##############################################################################
- #prepare:
- # name: Prepare
- # runs-on: ubuntu-latest
- # # needs: [nothing]
- # steps:
- # ##########################################################################
- # # CHECKOUT CODE ##########################################################
- # ##########################################################################
- # - name: Checkout code
- # uses: actions/checkout@v2
- # ##########################################################################
- # # TODO: DO STUFF ??? #####################################################
- # ##########################################################################
- # - name: Check translation files
- # run: |
- # scripts/translations/sort.sh
- # scripts/translations/missing-keys.sh
-
##############################################################################
# JOB: DOCKER BUILD TEST FRONTEND ############################################
##############################################################################
build_test_frontend:
name: Docker Build Test - Frontend
runs-on: ubuntu-latest
- #needs: [nothing] # [prepare]
+ #needs: [nothing]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@@ -39,7 +18,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
##########################################################################
- # NEO4J ##################################################################
+ # FRONTEND ###############################################################
##########################################################################
- name: Frontend | Build `test` image
run: |
@@ -78,30 +57,58 @@ jobs:
# path: /tmp/backend.tar
##############################################################################
- # JOB: DOCKER BUILD TEST WEBAPP ##############################################
+ # JOB: DOCKER BUILD TEST LOGIN SERVER ########################################
##############################################################################
- #build_test_webapp:
- # name: Docker Build Test - WebApp
- # runs-on: ubuntu-latest
- # needs: [prepare]
- # steps:
- # ##########################################################################
- # # CHECKOUT CODE ##########################################################
- # ##########################################################################
- # - name: Checkout code
- # uses: actions/checkout@v2
- # ##########################################################################
- # # BUILD WEBAPP DOCKER IMAGE (build) ######################################
- # ##########################################################################
- # - name: webapp | Build `test` image
- # run: |
- # docker build --target test -t "ocelotsocialnetwork/webapp:test" webapp/
- # docker save "ocelotsocialnetwork/webapp:test" > /tmp/webapp.tar
- # - name: Upload Artifact
- # uses: actions/upload-artifact@v2
- # with:
- # name: docker-webapp-test
- # path: /tmp/webapp.tar
+ build_test_login_server:
+ name: Docker Build Test - Login Server
+ runs-on: ubuntu-latest
+ #needs: [nothing]
+ steps:
+ ##########################################################################
+ # CHECKOUT CODE ##########################################################
+ ##########################################################################
+ - name: Checkout code
+ uses: actions/checkout@v2
+ with:
+ submodules: recursive
+ ##########################################################################
+ # BUILD LOGIN SERVER DOCKER IMAGE (build) ################################
+ ##########################################################################
+ - name: login server | Build `test` image
+ run: |
+ docker build --target login_server_debug -t "gradido/loginserver:test" -f ./login_server/Dockerfile.debug login_server/
+ docker save "gradido/loginserver:test" > /tmp/loginserver.tar
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: docker-loginserver-test
+ path: /tmp/loginserver.tar
+
+ ##############################################################################
+ # JOB: DOCKER BUILD TEST COMMUNITY SERVER ####################################
+ ##############################################################################
+ build_test_community_server:
+ name: Docker Build Test - Community Server
+ runs-on: ubuntu-latest
+ #needs: [nothing]
+ steps:
+ ##########################################################################
+ # CHECKOUT CODE ##########################################################
+ ##########################################################################
+ - name: Checkout code
+ uses: actions/checkout@v2
+ ##########################################################################
+ # BUILD COMMUNITY SERVER DOCKER IMAGE (build) ############################
+ ##########################################################################
+ - name: community server | Build `test` image
+ run: |
+ docker build -t "gradido/communityserver:test" -f ./community_server/Dockerfile ./
+ docker save "gradido/communityserver:test" > /tmp/communityserver.tar
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: docker-communityserver-test
+ path: /tmp/communityserver.tar
##############################################################################
# JOB: LINT FRONTEND #########################################################
@@ -207,38 +214,46 @@ jobs:
# run: docker-compose exec -T backend yarn test
##############################################################################
- # JOB: UNIT TEST WEBAPP ######################################################
+ # JOB: UNIT TEST FRONTEND ###################################################
##############################################################################
- #unit_test_webapp:
- # name: Unit tests - webapp
+ unit_test_frontend:
+ name: Unit tests - Frontend
+ runs-on: ubuntu-latest
+ needs: [build_test_frontend]
+ steps:
+ ##########################################################################
+ # CHECKOUT CODE ##########################################################
+ ##########################################################################
+ - name: Checkout code
+ uses: actions/checkout@v2
+ ##########################################################################
+ # DOWNLOAD DOCKER IMAGES #################################################
+ ##########################################################################
+ - name: Download Docker Image (Webapp)
+ uses: actions/download-artifact@v2
+ with:
+ name: docker-frontend-test
+ path: /tmp
+ - name: Load Docker Image
+ run: docker load < /tmp/frontend.tar
+ ##########################################################################
+ # UNIT TESTS FRONTEND ####################################################
+ ##########################################################################
+ - name: frontend | Unit tests
+ run: docker run --rm gradido/frontend:test yarn run test
+
+
+ #test:
# runs-on: ubuntu-latest
- # needs: [build_test_webapp]
# steps:
- # ##########################################################################
- # # CHECKOUT CODE ##########################################################
- # ##########################################################################
- # - name: Checkout code
- # uses: actions/checkout@v2
- # ##########################################################################
- # # DOWNLOAD DOCKER IMAGES #################################################
- # ##########################################################################
- # - name: Download Docker Image (Webapp)
- # uses: actions/download-artifact@v2
- # with:
- # name: docker-webapp-test
- # path: /tmp
- # - name: Load Docker Image
- # run: docker load < /tmp/webapp.tar
- # ##########################################################################
- # # UNIT TESTS WEBAPP #####################################################
- # ##########################################################################
- # # TODO: Why do we need those .envs?
- # - name: backend | copy env files webapp
- # run: cp webapp/.env.template webapp/.env
- # - name: backend | copy env files backend
- # run: cp backend/.env.template backend/.env
- # - name: backend | docker-compose
- # run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp
- # - name: webapp | Unit tests
- # #run: docker run --rm ocelotsocialnetwork/webapp:build yarn run test
- # run: docker-compose exec -T webapp yarn test
\ No newline at end of file
+ # - uses: actions/checkout@v2
+ # - name: Build the stack
+ # run: |
+ # git submodule update --init --recursive
+ # docker-compose up -d
+ # - name: Test
+ # env:
+ # GN_INSTANCE_FOLDER: /tmp/gradio-node-instance
+ # GN_CONTAINER_NAME: gradido-node-build
+ # run: docker run gradido-node-test
+ # timeout-minutes: 2
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index b12f322a2..5c23ad8bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
*.log
-/node_modules/*
\ No newline at end of file
+/node_modules/*
+.vscode
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ac578be89..8c943ecd9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,4 +4,66 @@ All notable changes to this project will be documented in this file. Dates are d
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
+#### [0.9.4](https://github.com/gradido/gradido/compare/0.9.3...0.9.4)
+
+- Build on run [`#103`](https://github.com/gradido/gradido/pull/103)
+- update debug docker to use dependencies container pushed to docker hub [`1f002f4`](https://github.com/gradido/gradido/commit/1f002f4ed0b12d4b2bf63efceabe546d0c5b58ea)
+- removed email tasks complete [`8a143be`](https://github.com/gradido/gradido/commit/8a143be8423d7bd894d4f512848895df8b9694b0)
+- build login-server on docker-compose up in a docker volume so it rebuild only neccessary parts if some c++ files have changed [`0da5279`](https://github.com/gradido/gradido/commit/0da527917523530186e6effe63dc001fc99bd3e3)
+
+#### [0.9.3](https://github.com/gradido/gradido/compare/0.9.2...0.9.3)
+
+> 30 March 2021
+
+- new version 0.9.3 [`#110`](https://github.com/gradido/gradido/pull/110)
+- feat: Frontend tests for Content Footer [`#102`](https://github.com/gradido/gradido/pull/102)
+- add check session state json function and doc [`#96`](https://github.com/gradido/gradido/pull/96)
+- activity page stap 2 [`#86`](https://github.com/gradido/gradido/pull/86)
+- qrcode scanner fixed, datum in activitäten fixed, sprache not null fixed [`#88`](https://github.com/gradido/gradido/pull/88)
+- add additional docker container which is running skeema on startup to… [`#83`](https://github.com/gradido/gradido/pull/83)
+- New fix up frontend for presentation [`#85`](https://github.com/gradido/gradido/pull/85)
+- feat: Tougher eslint rules [`#77`](https://github.com/gradido/gradido/pull/77)
+- feat: improve translations [`#81`](https://github.com/gradido/gradido/pull/81)
+- use_correct_send_api [`#80`](https://github.com/gradido/gradido/pull/80)
+- fix bug with access rights [`#78`](https://github.com/gradido/gradido/pull/78)
+- make response.html better accessible [`#75`](https://github.com/gradido/gradido/pull/75)
+- feat: Lokalize Validation Messages [`#67`](https://github.com/gradido/gradido/pull/67)
+- feat: Localize links to gradito.net [`#74`](https://github.com/gradido/gradido/pull/74)
+- fix-padding [`#73`](https://github.com/gradido/gradido/pull/73)
+- Correctly use transactions API in frontend [`#69`](https://github.com/gradido/gradido/pull/69)
+- Qr code scanner [`#72`](https://github.com/gradido/gradido/pull/72)
+- Login fail message [`#71`](https://github.com/gradido/gradido/pull/71)
+- Setup unit tests for frontend [`#55`](https://github.com/gradido/gradido/pull/55)
+- Update doc [`#63`](https://github.com/gradido/gradido/pull/63)
+- Add Feature in user search old frontend because Support has requested the feature long ago [`#56`](https://github.com/gradido/gradido/pull/56)
+- sprache angepasst, for login, pwd, sigin [`#54`](https://github.com/gradido/gradido/pull/54)
+- Improve workflows [`#53`](https://github.com/gradido/gradido/pull/53)
+- setup eslint with tougher rules [`1f13507`](https://github.com/gradido/gradido/commit/1f13507eacfd93c2248fb841de5f481c9eb1e6bd)
+- semicolon rule implemented [`6762a02`](https://github.com/gradido/gradido/commit/6762a028f2a3e4f2713b26bed81029defe686ad7)
+- dev meeting, bernd [`a99de7f`](https://github.com/gradido/gradido/commit/a99de7f5d1f7557c0877eae565aa4263d65aaaf3)
+
+#### [0.9.2](https://github.com/gradido/gradido/compare/0.9.1...0.9.2)
+
+> 18 March 2021
+
+- v0.9.2 [`#51`](https://github.com/gradido/gradido/pull/51)
+- Reload after login fixed [`#50`](https://github.com/gradido/gradido/pull/50)
+- Monorepo login server [`#48`](https://github.com/gradido/gradido/pull/48)
+- Stage0 [`#3`](https://github.com/gradido/gradido/pull/3)
+- Add auto-sign Transaction functionality [`5592275`](https://github.com/gradido/gradido/commit/55922753a7ffd9552be132501d744da491c409b5)
+- read in login the real client ip X-Real-IP from nginx forwarded not from community server [`512d307`](https://github.com/gradido/gradido/commit/512d307a19b955bb6e26ae8b274def354829b50f)
+- move check if all passwords allow direct into pwdValidation so it will work with every code which ask for password [`e2c38c1`](https://github.com/gradido/gradido/commit/e2c38c1a0fc25a4a2bc922c4bbc44d86b6d00d8b)
+
#### 0.9.1
+
+> 13 March 2021
+
+- Login gbb [`#12`](https://github.com/gradido/gradido/pull/12)
+- Admin prework axios json [`#10`](https://github.com/gradido/gradido/pull/10)
+- Merge pull request #1 from gradido/master [`#8`](https://github.com/gradido/gradido/pull/8)
+- [WIP] 2 create a dockerfile for the frontend application [`#6`](https://github.com/gradido/gradido/pull/6)
+- Master - first step [`#1`](https://github.com/gradido/gradido/pull/1)
+- Add docker compose [`#7`](https://github.com/gradido/gradido/pull/7)
+- style 404 side :) [`c7bdf89`](https://github.com/gradido/gradido/commit/c7bdf8978594b932615e48f9bb1c19d3c3bf3fcf)
+- publish workflow test [`df6f66f`](https://github.com/gradido/gradido/commit/df6f66ffe70baa9ed3f70b460a6c0c14011bb944)
+- many translations. translation structure [`bf68547`](https://github.com/gradido/gradido/commit/bf685479767d19c246c4d6abe3577dc3cb666346)
diff --git a/community_server/.gitmodules b/community_server/.gitmodules
index e7045e507..8499eaac6 100644
--- a/community_server/.gitmodules
+++ b/community_server/.gitmodules
@@ -1,3 +1,3 @@
[submodule "src/protobuf"]
path = src/protobuf
- url = git@github.com:gradido/gradido_protocol.git
\ No newline at end of file
+ url = git@github.com:gradido/gradido_protocol.git
diff --git a/community_server/Dockerfile b/community_server/Dockerfile
index cb4f67d27..8129d581d 100644
--- a/community_server/Dockerfile
+++ b/community_server/Dockerfile
@@ -1,17 +1,17 @@
-FROM phpdockerio/php74-fpm
-
-# install php fpm
-RUN apt-get update \
- && apt-get -y --no-install-recommends install curl unzip php7.4-curl php7.4-fpm php7.4-mbstring php7.4-intl php7.4-xml php7.4-pdo php7.4-mysql \
- && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
-
-WORKDIR /var/www/cakephp
-RUN mkdir logs && mkdir tmp && chmod 777 logs && chmod 777 tmp
-COPY ./community_server/ .
-COPY ./configs/community_server/app.php ./config/
-
-RUN composer update
-RUN composer dump-autoload
-
-
-
+FROM phpdockerio/php74-fpm
+
+# install php fpm
+RUN apt-get update \
+ && apt-get -y --no-install-recommends install curl unzip php7.4-curl php7.4-fpm php7.4-mbstring php7.4-intl php7.4-xml php7.4-pdo php7.4-mysql \
+ && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
+
+WORKDIR /var/www/cakephp
+RUN mkdir logs && mkdir tmp && chmod 777 logs && chmod 777 tmp
+COPY ./community_server/ .
+COPY ./configs/community_server/app.php ./config/
+
+RUN composer update
+RUN composer dump-autoload
+
+
+
diff --git a/community_server/config/nginx/fastcgi.conf b/community_server/config/nginx/fastcgi.conf
index c2976fe91..238f7869f 100644
--- a/community_server/config/nginx/fastcgi.conf
+++ b/community_server/config/nginx/fastcgi.conf
@@ -1,25 +1,25 @@
-fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
-fastcgi_param QUERY_STRING $query_string;
-fastcgi_param REQUEST_METHOD $request_method;
-fastcgi_param CONTENT_TYPE $content_type;
-fastcgi_param CONTENT_LENGTH $content_length;
-
-fastcgi_param SCRIPT_NAME $fastcgi_script_name;
-fastcgi_param REQUEST_URI $request_uri;
-fastcgi_param DOCUMENT_URI $document_uri;
-fastcgi_param DOCUMENT_ROOT $document_root;
-fastcgi_param SERVER_PROTOCOL $server_protocol;
-fastcgi_param REQUEST_SCHEME $scheme;
-fastcgi_param HTTPS $https if_not_empty;
-
-fastcgi_param GATEWAY_INTERFACE CGI/1.1;
-fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
-
-fastcgi_param REMOTE_ADDR $remote_addr;
-fastcgi_param REMOTE_PORT $remote_port;
-fastcgi_param SERVER_ADDR $server_addr;
-fastcgi_param SERVER_PORT $server_port;
-fastcgi_param SERVER_NAME $server_name;
-
-# PHP only, required if PHP was built with --enable-force-cgi-redirect
+fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+fastcgi_param QUERY_STRING $query_string;
+fastcgi_param REQUEST_METHOD $request_method;
+fastcgi_param CONTENT_TYPE $content_type;
+fastcgi_param CONTENT_LENGTH $content_length;
+
+fastcgi_param SCRIPT_NAME $fastcgi_script_name;
+fastcgi_param REQUEST_URI $request_uri;
+fastcgi_param DOCUMENT_URI $document_uri;
+fastcgi_param DOCUMENT_ROOT $document_root;
+fastcgi_param SERVER_PROTOCOL $server_protocol;
+fastcgi_param REQUEST_SCHEME $scheme;
+fastcgi_param HTTPS $https if_not_empty;
+
+fastcgi_param GATEWAY_INTERFACE CGI/1.1;
+fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
+
+fastcgi_param REMOTE_ADDR $remote_addr;
+fastcgi_param REMOTE_PORT $remote_port;
+fastcgi_param SERVER_ADDR $server_addr;
+fastcgi_param SERVER_PORT $server_port;
+fastcgi_param SERVER_NAME $server_name;
+
+# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
\ No newline at end of file
diff --git a/community_server/config/nginx/mime.types b/community_server/config/nginx/mime.types
index 84c644fc7..cd3d700ea 100644
--- a/community_server/config/nginx/mime.types
+++ b/community_server/config/nginx/mime.types
@@ -1,88 +1,88 @@
-types {
- text/html html htm shtml;
- text/css css;
- text/xml xml;
- image/gif gif;
- image/jpeg jpeg jpg;
- application/javascript js;
- application/atom+xml atom;
- application/rss+xml rss;
-
- text/mathml mml;
- text/plain txt;
- text/vnd.sun.j2me.app-descriptor jad;
- text/vnd.wap.wml wml;
- text/x-component htc;
-
- image/png png;
- image/tiff tif tiff;
- image/vnd.wap.wbmp wbmp;
- image/x-icon ico;
- image/x-jng jng;
- image/x-ms-bmp bmp;
- image/svg+xml svg svgz;
- image/webp webp;
-
- application/font-woff woff;
- application/java-archive jar war ear;
- application/json json;
- application/mac-binhex40 hqx;
- application/msword doc;
- application/pdf pdf;
- application/postscript ps eps ai;
- application/rtf rtf;
- application/vnd.apple.mpegurl m3u8;
- application/vnd.ms-excel xls;
- application/vnd.ms-fontobject eot;
- application/vnd.ms-powerpoint ppt;
- application/vnd.wap.wmlc wmlc;
- application/vnd.google-earth.kml+xml kml;
- application/vnd.google-earth.kmz kmz;
- application/x-7z-compressed 7z;
- application/x-cocoa cco;
- application/x-java-archive-diff jardiff;
- application/x-java-jnlp-file jnlp;
- application/x-makeself run;
- application/x-perl pl pm;
- application/x-pilot prc pdb;
- application/x-rar-compressed rar;
- application/x-redhat-package-manager rpm;
- application/x-sea sea;
- application/x-shockwave-flash swf;
- application/x-stuffit sit;
- application/x-tcl tcl tk;
- application/x-x509-ca-cert der pem crt;
- application/x-xpinstall xpi;
- application/xhtml+xml xhtml;
- application/xspf+xml xspf;
- application/zip zip;
-
- application/octet-stream bin exe dll;
- application/octet-stream deb;
- application/octet-stream dmg;
- application/octet-stream iso img;
- application/octet-stream msi msp msm;
-
- application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
- application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
-
- audio/midi mid midi kar;
- audio/mpeg mp3;
- audio/ogg ogg;
- audio/x-m4a m4a;
- audio/x-realaudio ra;
-
- video/3gpp 3gpp 3gp;
- video/mp2t ts;
- video/mp4 mp4;
- video/mpeg mpeg mpg;
- video/quicktime mov;
- video/webm webm;
- video/x-flv flv;
- video/x-m4v m4v;
- video/x-mng mng;
- video/x-ms-asf asx asf;
- video/x-ms-wmv wmv;
- video/x-msvideo avi;
-}
+types {
+ text/html html htm shtml;
+ text/css css;
+ text/xml xml;
+ image/gif gif;
+ image/jpeg jpeg jpg;
+ application/javascript js;
+ application/atom+xml atom;
+ application/rss+xml rss;
+
+ text/mathml mml;
+ text/plain txt;
+ text/vnd.sun.j2me.app-descriptor jad;
+ text/vnd.wap.wml wml;
+ text/x-component htc;
+
+ image/png png;
+ image/tiff tif tiff;
+ image/vnd.wap.wbmp wbmp;
+ image/x-icon ico;
+ image/x-jng jng;
+ image/x-ms-bmp bmp;
+ image/svg+xml svg svgz;
+ image/webp webp;
+
+ application/font-woff woff;
+ application/java-archive jar war ear;
+ application/json json;
+ application/mac-binhex40 hqx;
+ application/msword doc;
+ application/pdf pdf;
+ application/postscript ps eps ai;
+ application/rtf rtf;
+ application/vnd.apple.mpegurl m3u8;
+ application/vnd.ms-excel xls;
+ application/vnd.ms-fontobject eot;
+ application/vnd.ms-powerpoint ppt;
+ application/vnd.wap.wmlc wmlc;
+ application/vnd.google-earth.kml+xml kml;
+ application/vnd.google-earth.kmz kmz;
+ application/x-7z-compressed 7z;
+ application/x-cocoa cco;
+ application/x-java-archive-diff jardiff;
+ application/x-java-jnlp-file jnlp;
+ application/x-makeself run;
+ application/x-perl pl pm;
+ application/x-pilot prc pdb;
+ application/x-rar-compressed rar;
+ application/x-redhat-package-manager rpm;
+ application/x-sea sea;
+ application/x-shockwave-flash swf;
+ application/x-stuffit sit;
+ application/x-tcl tcl tk;
+ application/x-x509-ca-cert der pem crt;
+ application/x-xpinstall xpi;
+ application/xhtml+xml xhtml;
+ application/xspf+xml xspf;
+ application/zip zip;
+
+ application/octet-stream bin exe dll;
+ application/octet-stream deb;
+ application/octet-stream dmg;
+ application/octet-stream iso img;
+ application/octet-stream msi msp msm;
+
+ application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
+ application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
+ application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
+
+ audio/midi mid midi kar;
+ audio/mpeg mp3;
+ audio/ogg ogg;
+ audio/x-m4a m4a;
+ audio/x-realaudio ra;
+
+ video/3gpp 3gpp 3gp;
+ video/mp2t ts;
+ video/mp4 mp4;
+ video/mpeg mpeg mpg;
+ video/quicktime mov;
+ video/webm webm;
+ video/x-flv flv;
+ video/x-m4v m4v;
+ video/x-mng mng;
+ video/x-ms-asf asx asf;
+ video/x-ms-wmv wmv;
+ video/x-msvideo avi;
+}
diff --git a/community_server/config/nginx/nginx.conf b/community_server/config/nginx/nginx.conf
index 5aa5c3095..197c96167 100644
--- a/community_server/config/nginx/nginx.conf
+++ b/community_server/config/nginx/nginx.conf
@@ -1,86 +1,86 @@
-
-server {
-
- listen 80 ;
- listen [::]:80;
- server_name 0.0.0.0;
-
- #include /etc/nginx/common/protect.conf;
- #include /etc/nginx/common/protect_add_header.conf;
- #include /etc/nginx/common/ssl.conf;
-
-
- root /usr/share/nginx/html/webroot;
- index index.php;
-
- location ~* \.(png|jpg|ico|webp)\$ {
- expires 30d;
- }
-
- location ~* \.(js|css) {
- # expires 1d;
- expires 1d;
- }
-
- location ~ \.php\$ {
- # regex to split $uri to $fastcgi_script_name and $fastcgi_path
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
-
- # Check that the PHP script exists before passing it
- try_files $fastcgi_script_name =404;
-
- # Bypass the fact that try_files resets $fastcgi_path_info
- # see: http://trac.nginx.org/nginx/ticket/321
- set $path_info $fastcgi_path_info;
- fastcgi_param PATH_INFO $path_info;
-
- fastcgi_index index.php;
- include fastcgi.conf;
-
- #fastcgi_pass unix:/run/php/php7.3-fpm.sock;
- fastcgi_pass 127.0.0.1:9000;
-
- }
-
- location ~ /\.ht {
- deny all;
- }
-
- location /account {
- proxy_http_version 1.1;
- proxy_set_header Upgrade \$http_upgrade;
- proxy_set_header Connection 'upgrade';
- proxy_cache_bypass \$http_upgrade;
- proxy_set_header X-Real-IP \$remote_addr;
- proxy_set_header X-Forwarded-For \$remote_addr;
- proxy_set_header Host \$host;
- rewrite /account/(.*) /\$1 break;
-
- #proxy_next_upstream error timeout invalid_header http_502 non_idempotent;
- proxy_pass http://login-server:1200;
- proxy_redirect off;
-
-
- }
-
- location /login_api {
- proxy_http_version 1.1;
- proxy_set_header Upgrade \$http_upgrade;
- proxy_set_header Connection 'upgrade';
- proxy_cache_bypass \$http_upgrade;
- proxy_set_header X-Real-IP \$remote_addr;
- proxy_set_header X-Forwarded-For \$remote_addr;
- proxy_set_header Host \$host;
- rewrite /login_api/(.*) /\$1 break;
-
- proxy_pass http://login-server:1201;
- proxy_redirect off;
- }
-
- location / {
- try_files \$uri \$uri/ /index.php?\$args;
- }
-
-# access_log /var/log/nginx/access.log main;
-
+
+server {
+
+ listen 80 ;
+ listen [::]:80;
+ server_name 0.0.0.0;
+
+ #include /etc/nginx/common/protect.conf;
+ #include /etc/nginx/common/protect_add_header.conf;
+ #include /etc/nginx/common/ssl.conf;
+
+
+ root /usr/share/nginx/html/webroot;
+ index index.php;
+
+ location ~* \.(png|jpg|ico|webp)\$ {
+ expires 30d;
+ }
+
+ location ~* \.(js|css) {
+ # expires 1d;
+ expires 1d;
+ }
+
+ location ~ \.php\$ {
+ # regex to split $uri to $fastcgi_script_name and $fastcgi_path
+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
+
+ # Check that the PHP script exists before passing it
+ try_files $fastcgi_script_name =404;
+
+ # Bypass the fact that try_files resets $fastcgi_path_info
+ # see: http://trac.nginx.org/nginx/ticket/321
+ set $path_info $fastcgi_path_info;
+ fastcgi_param PATH_INFO $path_info;
+
+ fastcgi_index index.php;
+ include fastcgi.conf;
+
+ #fastcgi_pass unix:/run/php/php7.3-fpm.sock;
+ fastcgi_pass 127.0.0.1:9000;
+
+ }
+
+ location ~ /\.ht {
+ deny all;
+ }
+
+ location /account {
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade \$http_upgrade;
+ proxy_set_header Connection 'upgrade';
+ proxy_cache_bypass \$http_upgrade;
+ proxy_set_header X-Real-IP \$remote_addr;
+ proxy_set_header X-Forwarded-For \$remote_addr;
+ proxy_set_header Host \$host;
+ rewrite /account/(.*) /\$1 break;
+
+ #proxy_next_upstream error timeout invalid_header http_502 non_idempotent;
+ proxy_pass http://login-server:1200;
+ proxy_redirect off;
+
+
+ }
+
+ location /login_api {
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade \$http_upgrade;
+ proxy_set_header Connection 'upgrade';
+ proxy_cache_bypass \$http_upgrade;
+ proxy_set_header X-Real-IP \$remote_addr;
+ proxy_set_header X-Forwarded-For \$remote_addr;
+ proxy_set_header Host \$host;
+ rewrite /login_api/(.*) /\$1 break;
+
+ proxy_pass http://login-server:1201;
+ proxy_redirect off;
+ }
+
+ location / {
+ try_files \$uri \$uri/ /index.php?\$args;
+ }
+
+# access_log /var/log/nginx/access.log main;
+
}
\ No newline at end of file
diff --git a/community_server/mithril_client b/community_server/mithril_client
deleted file mode 160000
index f0b1d113c..000000000
--- a/community_server/mithril_client
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f0b1d113cee2a76e9dbb098b315f4acaf38410d0
diff --git a/community_server/skeema/gradido_community/community_profiles.sql b/community_server/skeema/gradido_community/community_profiles.sql
index ea857bebf..22926b126 100644
--- a/community_server/skeema/gradido_community/community_profiles.sql
+++ b/community_server/skeema/gradido_community/community_profiles.sql
@@ -1,8 +1,8 @@
-CREATE TABLE `community_profiles` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `state_user_id` int(10) unsigned NOT NULL,
- `profile_img` longblob,
- `profile_desc` varchar(2000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `state_user_id` (`state_user_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+CREATE TABLE `community_profiles` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `state_user_id` int(10) unsigned NOT NULL,
+ `profile_img` longblob,
+ `profile_desc` varchar(2000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `state_user_id` (`state_user_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
diff --git a/community_server/src/Controller/Component/JsonRequestClientComponent.php b/community_server/src/Controller/Component/JsonRequestClientComponent.php
index 4132894eb..c73a00528 100644
--- a/community_server/src/Controller/Component/JsonRequestClientComponent.php
+++ b/community_server/src/Controller/Component/JsonRequestClientComponent.php
@@ -60,7 +60,7 @@ class JsonRequestClientComponent extends Component
]), '/getRunningUserTasks');
}
- public function getUsers($session_id, $searchString)
+ public function getUsers($session_id, $searchString, $accountState)
{
if($searchString == "") {
return ['state' => 'error', 'type' => 'parameter error', 'msg' => 'search string is empty'];
@@ -71,7 +71,8 @@ class JsonRequestClientComponent extends Component
return $this->sendRequest(json_encode([
'session_id' => $session_id,
- 'search' => $searchString
+ 'search' => $searchString,
+ 'account_state' => $accountState,
]), '/getUsers');
}
diff --git a/community_server/src/Controller/StateBalancesController.php b/community_server/src/Controller/StateBalancesController.php
index 5d469ca35..43e1008c2 100644
--- a/community_server/src/Controller/StateBalancesController.php
+++ b/community_server/src/Controller/StateBalancesController.php
@@ -197,6 +197,7 @@ class StateBalancesController extends AppController
if ($result !== true) {
return $result;
}
+
$user = $session->read('StateUser');
$update_balance_result = $this->updateBalance($user['id']);
if($update_balance_result !== true) {
@@ -406,7 +407,7 @@ class StateBalancesController extends AppController
$this->set('calculated_balance', $calculated_balance);
$this->set('transactions', array_reverse($transactions_reversed));
- $this->set('transactionExecutingCount', $session->read('Transaction.executing'));
+ $this->set('transactionExecutingCount', $session->read('Transactions.executing'));
$this->set('balance', $session->read('StateUser.balance'));
$this->set('timeUsed', microtime(true) - $startTime);
$this->set('gdtSum', $gdtSum);
@@ -423,6 +424,7 @@ class StateBalancesController extends AppController
}
$session = $this->getRequest()->getSession();
$user = $session->read('StateUser');
+ $this->updateBalances($user['id']);
$public_key_bin = hex2bin($user['public_hex']);
$stateUserQuery = $this->StateBalances->StateUsers
@@ -580,7 +582,7 @@ class StateBalancesController extends AppController
return $this->returnJson([
'state' => 'success',
'transactions' => $transactions,
- 'transactionExecutingCount' => $session->read('Transaction.executing'),
+ 'transactionExecutingCount' => $session->read('Transactions.executing'),
'count' => count($transactions),
'gdtSum' => $gdtSum,
'timeUsed' => microtime(true) - $startTime
diff --git a/community_server/src/Controller/StateUserTransactionsController.php b/community_server/src/Controller/StateUserTransactionsController.php
index e9008179e..f816192f3 100644
--- a/community_server/src/Controller/StateUserTransactionsController.php
+++ b/community_server/src/Controller/StateUserTransactionsController.php
@@ -197,7 +197,7 @@ class StateUserTransactionsController extends AppController
return $this->returnJson([
'state' => 'success',
'transactions' => $transactions,
- 'transactionExecutingCount' => $session->read('Transaction.executing'),
+ 'transactionExecutingCount' => $session->read('Transactions.executing'),
'count' => $all_user_transactions_count,
'timeUsed' => microtime(true) - $startTime
]);
diff --git a/community_server/src/Controller/StateUsersController.php b/community_server/src/Controller/StateUsersController.php
index ddb3b695f..fc6ec8614 100644
--- a/community_server/src/Controller/StateUsersController.php
+++ b/community_server/src/Controller/StateUsersController.php
@@ -70,14 +70,14 @@ class StateUsersController extends AppController
$this->set(compact('stateUsers'));
}
- public function listIdentHashes()
+ /*public function listIdentHashes()
{
$stateUsers = $this->StateUsers->find('all')->toArray();
foreach($stateUsers as $i => $user) {
$stateUsers[$i]->identHash = TransactionCreation::DRMakeStringHash($user->email);
}
$this->set('stateUsers', $stateUsers);
- }
+ }*/
public function login($session_id)
{
@@ -128,9 +128,14 @@ class StateUsersController extends AppController
//$this->set('timeUsed', $timeUsed);
$csfr_token = $this->request->getParam('_csrfToken');
$this->set(compact('timeUsed', 'searchForm', 'csfr_token'));
-
+ $empty_string = '... empty ...';
if ($this->request->is('post')) {
+ $finalUserEntrys = [];
$requestData = $this->request->getData();
+ $account_state = $requestData['account_state'];
+ if($requestData['search'] == '' && $account_state != 'all') {
+ $requestData['search'] = $empty_string;
+ }
if($searchForm->validate($requestData)) {
//var_dump($requestData);
@@ -140,7 +145,7 @@ class StateUsersController extends AppController
$searchType = 'email';
}
// find users on login server
- $resultJson = $this->JsonRequestClient->getUsers($session->read('session_id'), $searchString);
+ $resultJson = $this->JsonRequestClient->getUsers($session->read('session_id'), $searchString, $account_state);
$loginServerUser = [];
if($resultJson['state'] == 'success') {
$dataJson = $resultJson['data'];
@@ -168,18 +173,31 @@ class StateUsersController extends AppController
}
}
// find user on community server db
- $globalSearch = '%' . $searchString . '%';
+
+
+
$communityUsers = $this->StateUsers
->find('all')
->contain(['StateBalances' => ['fields' => ['amount', 'state_user_id']]]);
+ if($account_state == 'email not activated') {
+ if(count($pubkeySorted) > 0) {
+ $communityUsers->where(['hex(public_key) IN' => array_keys($pubkeySorted)]);
+ } else {
+ $communityUsers = null;
+ }
+ } else {
+ $globalSearch = '%' . $searchString . '%';
$communityUsers->where(['OR' => [
'first_name LIKE' => $globalSearch,
'last_name LIKE' => $globalSearch,
'email LIKE' => $globalSearch
]]);
+ }
+
//var_dump($communityUsers->toArray());
+ if($communityUsers) {
foreach($communityUsers as $u) {
$pubkey_hex = bin2hex(stream_get_contents($u->public_key));
$u->public_hex = $pubkey_hex;
@@ -188,7 +206,8 @@ class StateUsersController extends AppController
}
array_push($pubkeySorted[$pubkey_hex]['community'], $u);
}
- $finalUserEntrys = [];
+ }
+
// detect states
foreach($pubkeySorted as $pubhex => $user) {
$finalUser = [];
diff --git a/community_server/src/Controller/TransactionCreationsController.php b/community_server/src/Controller/TransactionCreationsController.php
index 5acfce2d7..77429d8d7 100644
--- a/community_server/src/Controller/TransactionCreationsController.php
+++ b/community_server/src/Controller/TransactionCreationsController.php
@@ -54,12 +54,12 @@ class TransactionCreationsController extends AppController
];
$transactionCreations = $this->paginate($this->TransactionCreations);
$identHashes = [];
- foreach ($transactionCreations as $creation) {
+ /*foreach ($transactionCreations as $creation) {
$identHash = TransactionCreation::DRMakeStringHash($creation->state_user->email);
$identHashes[$creation->state_user->id] = $identHash;
- }
+ }*/
- $this->set(compact('transactionCreations', 'identHashes'));
+ //$this->set(compact('transactionCreations', 'identHashes'));
}
/**
@@ -125,7 +125,7 @@ class TransactionCreationsController extends AppController
if (count($receiverProposal) > $receiverIndex) {
$pubKeyHex = $receiverProposal[$receiverIndex]['key'];
- $identHash = TransactionCreation::DRMakeStringHash($receiverProposal[$receiverIndex]['email']);
+ //$identHash = TransactionCreation::DRMakeStringHash($receiverProposal[$receiverIndex]['email']);
}
$builderResult = TransactionCreation::build(
$amountCent,
@@ -323,7 +323,7 @@ class TransactionCreationsController extends AppController
$this->set('firstDayLastMonth', $firstDayLastMonth);
$this->set('activeUser', $user);
$this->set('creationForm', $creationForm);
- $this->set('transactionExecutingCount', $session->read('Transaction.executing'));
+ $this->set('transactionExecutingCount', $session->read('Transactions.executing'));
$this->set('timeUsed', microtime(true) - $startTime);
$this->set('countUsers', $countUsers);
$this->set('limit', $limit);
@@ -373,7 +373,20 @@ class TransactionCreationsController extends AppController
$pendings[$id] = $localAmountCent;
}
$pubKeyHex = bin2hex(stream_get_contents($receiverUser->public_key));
+ $requestAnswear = $this->JsonRequestClient->sendRequest(json_encode([
+ 'session_id' => $session->read('session_id'),
+ 'email' => $receiverUser->email,
+ 'ask' => ['user.identHash']
+ ]), '/getUserInfos');
+ $identHash = 0;
+ if('success' == $requestAnswear['state'] && 'success' == $requestAnswear['data']['state']) {
+ $identHash = $requestAnswear['data']['userData']['identHash'];
+ } else {
+ $this->Flash->error(__('Error by requesting LoginServer, please try again'));
+ }
+
+ //$identHash = TransactionCreation::DRMakeStringHash($receiverUser->email);
$localTargetDateFrozen = FrozenDate::now();
$localTargetDateFrozen = $localTargetDateFrozen
->year($localTargetDate['year'])
diff --git a/community_server/src/Form/UserSearchForm.php b/community_server/src/Form/UserSearchForm.php
index e2955e244..c68269920 100644
--- a/community_server/src/Form/UserSearchForm.php
+++ b/community_server/src/Form/UserSearchForm.php
@@ -11,7 +11,9 @@ class UserSearchForm extends Form
protected function _buildSchema(Schema $schema)
{
- return $schema->addField('search', ['type' => 'string']);
+ return $schema
+ ->addField('search', ['type' => 'string'])
+ ->addField('account_state', ['type' => 'select']);
}
function validationDefault(Validator $validator)
diff --git a/community_server/src/Model/Entity/StateBalance.php b/community_server/src/Model/Entity/StateBalance.php
index 0381864b6..0f103b8b9 100644
--- a/community_server/src/Model/Entity/StateBalance.php
+++ b/community_server/src/Model/Entity/StateBalance.php
@@ -59,7 +59,8 @@ class StateBalance extends Entity
if($decay_duration === 0) {
return $this->amount;
}
- return $this->amount * pow(0.99999997802044727, $decay_duration);
+ return $this->amount;
+ //return $this->amount * pow(0.99999997802044727, $decay_duration);
}
public function partDecay($target_date)
@@ -68,7 +69,8 @@ class StateBalance extends Entity
if($decay_duration <= 0) {
return $this->amount;
}
- return $this->amount * pow(0.99999997802044727, $decay_duration);
+ return 0;
+ //return $this->amount * pow(0.99999997802044727, $decay_duration);
}
public function decayDuration($target_date)
diff --git a/community_server/src/Model/Transactions/TransactionBody.php b/community_server/src/Model/Transactions/TransactionBody.php
index 8164f33f7..ef785705c 100644
--- a/community_server/src/Model/Transactions/TransactionBody.php
+++ b/community_server/src/Model/Transactions/TransactionBody.php
@@ -3,6 +3,7 @@
namespace Model\Transactions;
use Cake\ORM\TableRegistry;
+use Cake\I18n\Date;
class TransactionBody extends TransactionBase {
private $mProtoTransactionBody = null;
@@ -75,6 +76,7 @@ class TransactionBody extends TransactionBase {
$transactionEntity->transaction_type_id = $this->transactionTypeId;
$transactionEntity->memo = $this->getMemo();
+ $transactionEntity->received = new Date();
if ($transactionsTable->save($transactionEntity)) {
// success
diff --git a/community_server/src/Model/Transactions/TransactionCreation.php b/community_server/src/Model/Transactions/TransactionCreation.php
index e8c6133cb..aeac73ce8 100644
--- a/community_server/src/Model/Transactions/TransactionCreation.php
+++ b/community_server/src/Model/Transactions/TransactionCreation.php
@@ -63,24 +63,6 @@ class TransactionCreation extends TransactionBase {
return ['state' => 'success', 'transactionBody' => $transactionBody];
}
- static protected function DRHashRotateLeft( $hash, $rotateBy )
- {
- return ($hash<<$rotateBy)|($hash>>(32-$rotateBy));
- }
-
- static public function DRMakeStringHash($str)
- {
- $ret = 0;
-
- if( $str )
- {
- for ($i=0; $i < strlen($str); $i++)
- {
- $ret = TransactionCreation::DRHashRotateLeft($ret, 7) + ord($str{$i});
- }
- }
- return $ret;
- }
public function getAmount() {
return $this->protoTransactionCreation->getReceiverAmount()->getAmount();
@@ -272,7 +254,7 @@ class TransactionCreation extends TransactionBase {
->setSubject(__('Gradido Schöpfung erhalten'))
->send();
} catch(Exception $e) {
- $this->addError('TransactionCreation::sendNotificationEmail', 'error sending notification email: ' . $e->getMessage());
+// $this->addError('TransactionCreation::sendNotificationEmail', 'error sending notification email: ' . $e->getMessage());
return false;
}
return true;
@@ -303,7 +285,7 @@ class TransactionCreation extends TransactionBase {
// intval
//$protoCreation->setIdentHash(intval($identHashBytes));
- $protoCreation->setIdentHash(self::DRMakeStringHash($stateUser->email));
+ //$protoCreation->setIdentHash(self::DRMakeStringHash($stateUser->email));
return new TransactionCreation($protoCreation);
}
}
diff --git a/community_server/src/Model/Transactions/TransactionTransfer.php b/community_server/src/Model/Transactions/TransactionTransfer.php
index a509cf0f3..b9182c3ba 100644
--- a/community_server/src/Model/Transactions/TransactionTransfer.php
+++ b/community_server/src/Model/Transactions/TransactionTransfer.php
@@ -75,7 +75,8 @@ class TransactionTransfer extends TransactionBase {
foreach($sigPairs as $sigPair) {
//echo 'sig Pair: '; var_dump($sigPair); echo "
";
$pubkey = bin2hex($sigPair->getPubKey());
- $hash = TransactionCreation::DRMakeStringHash($pubkey);
+ //$hash = TransactionCreation::DRMakeStringHash($pubkey);
+ $hash = $pubkey;
if(!isset($sigPubHexs[$hash])) {
$sigPubHexs[$hash] = [$pubkey];
} else {
@@ -100,7 +101,8 @@ class TransactionTransfer extends TransactionBase {
return false;
}
// check if signature exist for sender
- $hash = TransactionCreation::DRMakeStringHash($senderPublicHex);
+ //$hash = TransactionCreation::DRMakeStringHash($senderPublicHex);
+ $hash = $senderPublicHex;
if(!isset($sigPubHexs[$hash]) || in_array($senderPublicHex, $sigPubHexs[$hash]) === FALSE) {
$this->addError($functionName, 'missing signature for sender');
return false;
@@ -253,7 +255,7 @@ class TransactionTransfer extends TransactionBase {
->setSubject(__('Gradidos erhalten'))
->send();
} catch(Exception $e) {
- $this->addError('TransactionTransfer::sendNotificationEmail', 'error sending notification email: ' . $e->getMessage());
+ //$this->addError('TransactionTransfer::sendNotificationEmail', 'error sending notification email: ' . $e->getMessage());
return false;
}
return true;
diff --git a/community_server/src/Template/StateUsers/list_ident_hashes.ctp b/community_server/src/Template/StateUsers/list_ident_hashes.ctp
index 7f50910b1..777a32c99 100644
--- a/community_server/src/Template/StateUsers/list_ident_hashes.ctp
+++ b/community_server/src/Template/StateUsers/list_ident_hashes.ctp
@@ -1,29 +1,29 @@
-
-
| first name | last name | identHash | Public key hex - | |
|---|---|---|---|---|
| = $user->first_name ?> | -= $user->last_name ?> | -= $user->email ?> | -= $user->identHash ?> | -= bin2hex(stream_get_contents($user->public_key)) ?> | -
| first name | last name | identHash | Public key hex + | |
|---|---|---|---|---|
| = $user->first_name ?> | += $user->last_name ?> | += $user->email ?> | += $user->identHash ?> | += bin2hex(stream_get_contents($user->public_key)) ?> | +
Benutzer suchen
transactions count: = $count1 ?>
-state_user_transaction count: = $count2 ?>
-Missing count: = count($missing_transactions); ?>
-First 10 Missing ids:
-$id) { - if($i > 10) break; - if($i > 0) echo ', '; - echo $id['id']; -} ?>
- - -transactions count: = $count1 ?>
+state_user_transaction count: = $count2 ?>
+Missing count: = count($missing_transactions); ?>
+First 10 Missing ids:
+$id) { + if($i > 10) break; + if($i > 0) echo ', '; + echo $id['id']; +} ?>
+ + +
-