From 8bf3b3df6bf6aeaf759ed1b399d876de49c6e634 Mon Sep 17 00:00:00 2001 From: Finn Stutzenstein Date: Tue, 3 Nov 2020 11:33:23 +0100 Subject: [PATCH] Structured fields, updated repos --- dev-commands/set-ds.sh | 2 +- docker/docker-compose.dev.yml | 6 ++++++ docs/example-data.json | 27 ++++----------------------- docs/models.yml | 4 +++- openslides-auth-service | 2 +- openslides-autoupdate-service | 2 +- openslides-backend | 2 +- openslides-client | 2 +- 8 files changed, 18 insertions(+), 29 deletions(-) diff --git a/dev-commands/set-ds.sh b/dev-commands/set-ds.sh index edaf98e03..eca148318 100755 --- a/dev-commands/set-ds.sh +++ b/dev-commands/set-ds.sh @@ -6,5 +6,5 @@ cd "$(dirname $0)" # first argument is the example data DATA=$(cat ${1:-../docs/example-data.json}) ./clear-ds.sh -docker-compose -f ../docker-compose.yml -f ../docker-compose.dev.yml exec datastore-writer \ +docker-compose -f ../docker/docker-compose.dev.yml exec datastore-writer \ bash -c "source export-database-variables.sh; echo '$DATA' > /data.json; export DATASTORE_INITIAL_DATA_FILE=/data.json; python cli/create_initial_data.py" diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index c169b66e1..55497bae7 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -10,6 +10,8 @@ services: volumes: - ../openslides-datastore-service/shared/shared:/app/shared - ../openslides-datastore-service/reader/reader:/app/reader + ports: + - 9010:9010 datastore-writer: image: openslides-datastore-writer-dev depends_on: @@ -24,6 +26,8 @@ services: - DATASTORE_ENABLE_DEV_ENVIRONMENT=1 - COMMAND=create_initial_data - DATASTORE_INITIAL_DATA_FILE=https://raw.githubusercontent.com/OpenSlides/OpenSlides/openslides4-dev/docs/example-data.json + ports: + - 9011:9011 postgres: image: postgres:11 environment: @@ -51,6 +55,8 @@ services: depends_on: - datastore-reader - message-bus + environment: + - AUTH=fake env_file: services.env volumes: - ../openslides-autoupdate-service/cmd:/root/cmd diff --git a/docs/example-data.json b/docs/example-data.json index b7d2b2f55..9eae2317e 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -21,7 +21,7 @@ "first_name": "", "last_name": "Administrator", "is_active": true, - "is_committee": false, + "is_physical_person": true, "password": "316af7b2ddc20ead599c38541fbe87e9a9e4e960d4017d6e59de188b41b2758flD5BVZAZ8jLy4nYW9iomHcnkXWkfk3PgBjeiTSxjGG7+fBjMBxsaS1vIiAMxYh+K38l0gDW4wcP+i8tgoc4UBg==", "default_password": "admin", "about_me": "", @@ -46,34 +46,25 @@ "group_$_ids": ["1"], "group_$1_ids": [2], - "group_1_ids": [2], "speaker_$_ids": ["1"], "speaker_$1_ids": [1, 5, 6, 12], - "speaker_1_ids": [1, 5, 6, 12], "personal_note_$_ids": ["1"], "personal_note_$1_ids": [1], - "personal_note_1_ids": [1], "supported_motion_$_ids": [], "submitted_motion_$_ids": ["1"], "submitted_motion_$1_ids": [1, 2, 3, 4], - "submitted_motion_1_ids": [1, 2, 3, 4], "motion_poll_voted_$_ids": [], "motion_vote_$_ids": [], "assignment_candidate_$_ids": ["1"], "assignment_candidate_$1_ids": [1], - "assignment_candidate_1_ids": [1], "assignment_poll_voted_$_ids": ["1"], "assignment_poll_voted_$1_ids": [3], - "assignment_poll_voted_1_ids": [3], "assignment_option_$_ids": ["1"], "assignment_option_$1_ids": [1, 2], - "assignment_option_1_ids": [1, 2], "assignment_vote_$_ids": ["1"], "assignment_vote_$1_ids": [4], - "assignment_vote_1_ids": [4], "assignment_delegated_vote_$_ids": ["1"], - "assignment_delegated_vote_$1_ids": [4], - "assignment_delegated_vote_1_ids": [4] + "assignment_delegated_vote_$1_ids": [4] }, { "id": 2, @@ -82,7 +73,7 @@ "first_name": "a", "last_name": "", "is_active": true, - "is_committee": false, + "is_physical_person": true, "password": "316af7b2ddc20ead599c38541fbe87e9a9e4e960d4017d6e59de188b41b2758fDB3tv5HcCtPRREt7bPGqerTf1AbmoKXt/fVFkLY4znDRh2Yy0m3ZjXD0nHI8oa6KrGlHH/cvysfvf8i2fWIzmw==", "default_password": "a", "about_me": "", @@ -107,10 +98,8 @@ "group_$_ids": ["1"], "group_$1_ids": [6], - "group_1_ids": [6], "speaker_$_ids": ["1"], "speaker_$1_ids": [2, 3, 7, 10, 11, 13], - "speaker_1_ids": [2, 3, 7, 10, 11, 13], "personal_note_$_ids": [], "supported_motion_$_ids": [], "submitted_motion_$_ids": [], @@ -118,11 +107,9 @@ "motion_vote_$_ids": [], "assignment_candidate_$_ids": ["1"], "assignment_candidate_$1_ids": [3, 5], - "assignment_candidate_1_ids": [3, 5], "assignment_poll_voted_$_ids": [], "assignment_option_$_ids": ["1"], "assignment_option_$1_ids": [6], - "assignment_option_1_ids": [6], "assignment_vote_$_ids": [] }, { @@ -132,7 +119,7 @@ "first_name": "b", "last_name": "", "is_active": true, - "is_committee": false, + "is_physical_person": true, "password": "316af7b2ddc20ead599c38541fbe87e9a9e4e960d4017d6e59de188b41b2758fIxDxvpkn6dDLRxT9DxJhZ/f04AL2oK2beICRFobSw53CI93U+dfN+w+NaL7BvrcR4JWuMj9NkH4dVjnnI0YTkg==", "default_password": "jKwSLGCk", "about_me": "", @@ -158,21 +145,17 @@ "group_$_ids": [], "speaker_$_ids": ["1"], "speaker_$1_ids": [4, 8, 9], - "speaker_1_ids": [4, 8, 9], "personal_note_$_ids": [], "supported_motion_$_ids": ["1"], "supported_motion_$1_ids": [3], - "supported_motion_1_ids": [3], "submitted_motion_$_ids": [], "motion_poll_voted_$_ids": [], "motion_vote_$_ids": [], "assignment_candidate_$_ids": ["1"], "assignment_candidate_$1_ids": [2, 4], - "assignment_candidate_1_ids": [2, 4], "assignment_poll_voted_$_ids": [], "assignment_option_$_ids": ["1"], "assignment_option_$1_ids": [3, 4, 5], - "assignment_option_1_ids": [3, 4, 5], "assignment_vote_$_ids": [] }], "role": [ @@ -335,7 +318,6 @@ "logo_$_id": ["web_header"], "logo_$web_header_id": 3, - "logo_web_header_id": 3, "font_$_id": [], "committee_id": 1, @@ -2231,7 +2213,6 @@ "used_as_logo_$_in_meeting_id": ["web_header"], "used_as_logo_$web_header_in_meeting_id": 1, - "used_as_logo_web_header_in_meeting_id": 1, "used_as_font_$_in_meeting_id": [] }], "projector": [ diff --git a/docs/models.yml b/docs/models.yml index 8acb25078..343fe773a 100644 --- a/docs/models.yml +++ b/docs/models.yml @@ -85,7 +85,9 @@ user: first_name: string last_name: string is_active: boolean - is_committee: boolean + is_physical_person: + type: boolean + default: true password: string default_password: string about_me: HTMLStrict diff --git a/openslides-auth-service b/openslides-auth-service index 655cbd4bd..39a414830 160000 --- a/openslides-auth-service +++ b/openslides-auth-service @@ -1 +1 @@ -Subproject commit 655cbd4bd8397ff4a0665c549283e6e71e5ea123 +Subproject commit 39a414830b707898ad8b825a68531cf454c204b5 diff --git a/openslides-autoupdate-service b/openslides-autoupdate-service index 12af349d2..b53d65b2d 160000 --- a/openslides-autoupdate-service +++ b/openslides-autoupdate-service @@ -1 +1 @@ -Subproject commit 12af349d2d90246d3492939278d09872c2f40f44 +Subproject commit b53d65b2da1eb998f8ccdd2d3149e197022acc99 diff --git a/openslides-backend b/openslides-backend index 9938ed0e7..04e44e675 160000 --- a/openslides-backend +++ b/openslides-backend @@ -1 +1 @@ -Subproject commit 9938ed0e73793f98aac2d2d5ef246f2301e85855 +Subproject commit 04e44e675388d54ccc7f4d91d3f4809750bc7aba diff --git a/openslides-client b/openslides-client index cde0f50e5..d6f51bd8c 160000 --- a/openslides-client +++ b/openslides-client @@ -1 +1 @@ -Subproject commit cde0f50e56028b0724cc6139b0caaa4bd045bb89 +Subproject commit d6f51bd8c90ccbe932ca41b994a2e708364686f1