commit
c2f1d2b4b8
20
.github/announcement_templates/updates-to-initial-data.md
vendored
Normal file
20
.github/announcement_templates/updates-to-initial-data.md
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
title: The initial-data.json got updated
|
||||
assignees: tsiegleauq, ostcar, normanjaeckel, jsangmeister
|
||||
labels: documentation, OpenSlides4, meta
|
||||
---
|
||||
|
||||
# Changes to `initial-data.json` have just been added to OpenSlides
|
||||
|
||||
Please acknowledge the recent changes to `initial-data.json` and update your projects accordingly.
|
||||
|
||||
### Current `initial-data.json`
|
||||
[docker/initial-data.json]({{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/blob/master/docker/initial-data.json)
|
||||
|
||||
### Corresponding Commit:
|
||||
[{{ env.GITHUB_SHA }}]({{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/commit/{{ env.GITHUB_SHA }})
|
||||
|
||||
## Affected Projects
|
||||
|
||||
### Manage
|
||||
https://github.com/OpenSlides/openslides-manage-service
|
24
.github/workflows/announce-initial-data-updates.yml
vendored
Normal file
24
.github/workflows/announce-initial-data-updates.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Announce initial-data.json updates
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'docker/initial-data.json'
|
||||
|
||||
jobs:
|
||||
announce-update:
|
||||
name: 'Announce updates to initial-data.json'
|
||||
if: ${{ github.event.pull_request.merged }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Create Issue
|
||||
uses: JasonEtco/create-an-issue@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
filename: .github/announcement_templates/updates-to-initial-data.md
|
5
.github/workflows/announce-model-updates.yml
vendored
5
.github/workflows/announce-model-updates.yml
vendored
@ -3,8 +3,7 @@ name: Announce model updates
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- openslides4-dev
|
||||
# - master
|
||||
- master
|
||||
paths:
|
||||
- 'docs/models.yml'
|
||||
|
||||
@ -22,4 +21,4 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
filename: .github/announcement_templates/updates-to-models.md
|
||||
filename: .github/announcement_templates/updates-to-models.md
|
||||
|
@ -3,8 +3,7 @@ name: Announce permission updates
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- openslides4-dev
|
||||
# - master
|
||||
- master
|
||||
paths:
|
||||
- 'docs/permission.yml'
|
||||
|
||||
@ -22,4 +21,4 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
filename: .github/announcement_templates/updates-to-permissions.md
|
||||
filename: .github/announcement_templates/updates-to-permissions.md
|
||||
|
2
.github/workflows/md5_check_initial-data.yml
vendored
2
.github/workflows/md5_check_initial-data.yml
vendored
@ -21,4 +21,4 @@ jobs:
|
||||
run: md5sum docker/initial-data.json
|
||||
|
||||
- name: Validate and protect initial-data.json
|
||||
run: echo "79e29bd433253fac11899059d59cebe3 docker/initial-data.json" | md5sum -c -
|
||||
run: echo "4ecdf1325e840396f664c675dd6f35ea docker/initial-data.json" | md5sum -c -
|
||||
|
46
.github/workflows/models.yml
vendored
46
.github/workflows/models.yml
vendored
@ -1,5 +1,5 @@
|
||||
---
|
||||
name: Validate models.yml and example data
|
||||
name: Validate models.yml, initial-data.json and example-data.json
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
PYTHON_VERSION: 3.9.6
|
||||
@ -50,9 +50,35 @@ jobs:
|
||||
- name: Validate example-data.json
|
||||
run: python openslides-backend/cli/check_json.py docs/example-data.json
|
||||
|
||||
validate-initial-data-1:
|
||||
name: Validate initial-data.json without migration check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
validate-initial-data:
|
||||
name: Validate initial-data.json
|
||||
- name: Checkout backend submodule
|
||||
run: git submodule update --init openslides-backend/
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Install requirements
|
||||
run: pip install -U -r openslides-backend/cli/requirements.txt
|
||||
|
||||
- name: set pythonpath
|
||||
run: echo "PYTHONPATH=openslides-backend" >> $GITHUB_ENV
|
||||
|
||||
- name: generate models.py for next step
|
||||
run: python openslides-backend/cli/generate_models.py docs/models.yml
|
||||
|
||||
- name: Validate example-data.json
|
||||
run: python openslides-backend/cli/check_json.py docker/initial-data.json
|
||||
|
||||
validate-initial-data-2:
|
||||
name: Validate initial-data.json with migration check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
@ -87,23 +113,23 @@ jobs:
|
||||
- name: Wait for action service # The datastore is started, too
|
||||
working-directory: .github/initial-data-migrations/
|
||||
run: docker-compose exec -T backend ./wait.sh backend 9002
|
||||
|
||||
|
||||
- name: Inject initial data into the datastore
|
||||
working-directory: .github/initial-data-migrations/
|
||||
run: docker-compose exec -T writer bash -c "source export-database-variables.sh; echo '$(cat ../../docker/initial-data.json)' > /data.json; export DATASTORE_INITIAL_DATA_FILE=/data.json; python cli/create_initial_data.py"
|
||||
|
||||
- name: Export unmigrated data from the datastore
|
||||
run: "curl --header 'Content-Type: application/json' -d '{}' http://localhost:9010/internal/datastore/reader/get_everything 2> /dev/null | python3 dev-commands/strip-meta-fields.py > export.json"
|
||||
#- name: Export unmigrated data from the datastore
|
||||
# run: "curl --header 'Content-Type: application/json' -d '{}' http://localhost:9010/internal/datastore/reader/get_everything 2> /dev/null | python3 dev-commands/strip-meta-fields.py > export.json"
|
||||
|
||||
- name: Validate initial-data.json. It must fail since it is unmigrated
|
||||
run: if python openslides-backend/cli/check_json.py --partial export.json > /dev/null; then false; else true; fi
|
||||
#- name: Validate initial-data.json. It must fail since it is unmigrated
|
||||
# run: if python openslides-backend/cli/check_json.py --partial export.json > /dev/null; then false; else true; fi
|
||||
|
||||
- name: Migrate
|
||||
- name: Migrate (but there should be nothing to do)
|
||||
working-directory: .github/initial-data-migrations/
|
||||
run: docker-compose exec -T backend bash -c "source ./entrypoint.sh; cd migrations; python migrate.py finalize"
|
||||
|
||||
- name: Export migrated data from the datastore
|
||||
run: "curl --header 'Content-Type: application/json' -d '{}' http://localhost:9010/internal/datastore/reader/get_everything 2> /dev/null | python3 dev-commands/strip-meta-fields.py > export.json"
|
||||
|
||||
- name: Validate initial-data.json
|
||||
- name: Validate exported initial-data.json
|
||||
run: python openslides-backend/cli/check_json.py --partial export.json
|
||||
|
20
README.md
20
README.md
@ -6,6 +6,7 @@ OpenSlides is a free, web based presentation and assembly system for
|
||||
managing and projecting agenda, motions and elections of an assembly. See
|
||||
https://openslides.com for more information.
|
||||
|
||||
|
||||
## Using OpenSlides productively
|
||||
|
||||
__OpenSlides 4 (this) is currently under heavy development!__
|
||||
@ -13,7 +14,6 @@ __OpenSlides 4 (this) is currently under heavy development!__
|
||||
If you are just looking to use OpenSlides in a productive manner, please refer
|
||||
to the [OpenSlides 3.4 (stable)](https://github.com/OpenSlides/OpenSlides/tree/stable/3.4.x)
|
||||
|
||||
__Everything else in this document is irrelevant for you__
|
||||
|
||||
## Installation
|
||||
|
||||
@ -24,11 +24,21 @@ Compose](https://docs.docker.com/compose/install/).
|
||||
|
||||
### Setup OpenSlides
|
||||
|
||||
For a productive setup of OpenSlides follow the instructions outlined in the [OpenSlides-manage-service](https://github.com/OpenSlides/openslides-manage-service)
|
||||
For a productive setup of OpenSlides get the [OpenSlides manage
|
||||
tool](https://github.com/OpenSlides/openslides-manage-service/releases/tag/latest)
|
||||
from GitHub and make it executable. E. g. run:
|
||||
|
||||
$ wget https://github.com/OpenSlides/openslides-manage-service/releases/download/latest/openslides
|
||||
$ chmod +x openslides
|
||||
|
||||
Then follow the instructions outlined in the [OpenSlides Manage
|
||||
Service](https://github.com/OpenSlides/openslides-manage-service).
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
For further information about developing OpenSlides, refer to [the development readme](DEVELOPMENT.md)
|
||||
For further information about developing OpenSlides, refer to [the development
|
||||
readme](DEVELOPMENT.md).
|
||||
|
||||
### Architecture of OpenSlides 4
|
||||
|
||||
@ -36,7 +46,9 @@ For further information about developing OpenSlides, refer to [the development r
|
||||
|
||||
Read more about our [concept of OpenSlides 4.0](https://github.com/OpenSlides/OpenSlides/wiki/DE%3AKonzept-OpenSlides-4).
|
||||
|
||||
The technical documentation about the internals, requests and functionality can be found [in the wiki](https://github.com/OpenSlides/OpenSlides/wiki/DE%3AKonzept-OpenSlides-4).
|
||||
The technical documentation about the internals, requests and functionality can
|
||||
be found [in the wiki](https://github.com/OpenSlides/OpenSlides/wiki/DE%3AKonzept-OpenSlides-4).
|
||||
|
||||
|
||||
## License and authors
|
||||
|
||||
|
@ -4,9 +4,9 @@ import json
|
||||
data = sys.stdin.read()
|
||||
json_data = json.loads(data)
|
||||
for collection, models in json_data.items():
|
||||
for model in models:
|
||||
for model in models.values():
|
||||
for field in list(model.keys()):
|
||||
if field.startswith("meta_"):
|
||||
del model[field]
|
||||
|
||||
sys.stdout.write(json.dumps(json_data, separators=(',', ':')))
|
||||
sys.stdout.write(json.dumps(json_data, separators=(',', ':')))
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"_migration_index": 1,
|
||||
"organization": [
|
||||
{
|
||||
"_migration_index": 3,
|
||||
"organization": {
|
||||
"1": {
|
||||
"id": 1,
|
||||
"name": "[Your organization]",
|
||||
"description": "",
|
||||
@ -11,13 +11,19 @@
|
||||
"theme": "openslides-default-light-theme",
|
||||
"reset_password_verbose_errors": false,
|
||||
"enable_electronic_voting": false,
|
||||
"committee_ids": [1],
|
||||
"limit_of_meetings": 0,
|
||||
"committee_ids": [
|
||||
1
|
||||
],
|
||||
"active_meeting_ids": [
|
||||
1
|
||||
],
|
||||
"resource_ids": [],
|
||||
"organization_tag_ids": []
|
||||
}
|
||||
],
|
||||
"user": [
|
||||
{
|
||||
},
|
||||
"user": {
|
||||
"1": {
|
||||
"id": 1,
|
||||
"username": "superadmin",
|
||||
"title": "",
|
||||
@ -59,11 +65,11 @@
|
||||
"vote_delegations_$_from_ids": [],
|
||||
"meeting_ids": []
|
||||
}
|
||||
],
|
||||
"resource": [],
|
||||
"organization_tag": [],
|
||||
"committee": [
|
||||
{
|
||||
},
|
||||
"resource": {},
|
||||
"organization_tag": {},
|
||||
"committee": {
|
||||
"1": {
|
||||
"id": 1,
|
||||
"name": "Default committee",
|
||||
"description": "",
|
||||
@ -78,13 +84,14 @@
|
||||
"organization_tag_ids": [],
|
||||
"organization_id": 1
|
||||
}
|
||||
],
|
||||
"meeting": [
|
||||
{
|
||||
},
|
||||
"meeting": {
|
||||
"1": {
|
||||
"id": 1,
|
||||
"welcome_title": "Welcome to OpenSlides",
|
||||
"welcome_text": "[Space for your welcome text]",
|
||||
"name": "Default meeting",
|
||||
"is_active_in_organization_id": 1,
|
||||
"description": "",
|
||||
"location": "",
|
||||
"start_time": 0,
|
||||
@ -305,9 +312,9 @@
|
||||
"default_group_id": 1,
|
||||
"admin_group_id": 2
|
||||
}
|
||||
],
|
||||
"group": [
|
||||
{
|
||||
},
|
||||
"group": {
|
||||
"1": {
|
||||
"id": 1,
|
||||
"name": "Default",
|
||||
"permissions": [
|
||||
@ -337,7 +344,7 @@
|
||||
"used_as_poll_default_id": null,
|
||||
"meeting_id": 1
|
||||
},
|
||||
{
|
||||
"2": {
|
||||
"id": 2,
|
||||
"name": "Admin",
|
||||
"permissions": [],
|
||||
@ -356,7 +363,7 @@
|
||||
"used_as_poll_default_id": null,
|
||||
"meeting_id": 1
|
||||
},
|
||||
{
|
||||
"3": {
|
||||
"id": 3,
|
||||
"name": "Delegates",
|
||||
"permissions": [
|
||||
@ -392,7 +399,7 @@
|
||||
"used_as_poll_default_id": 1,
|
||||
"meeting_id": 1
|
||||
},
|
||||
{
|
||||
"4": {
|
||||
"id": 4,
|
||||
"name": "Staff",
|
||||
"permissions": [
|
||||
@ -440,22 +447,22 @@
|
||||
"used_as_poll_default_id": null,
|
||||
"meeting_id": 1
|
||||
}
|
||||
],
|
||||
"personal_note": [],
|
||||
"tag": [],
|
||||
"agenda_item": [],
|
||||
"list_of_speakers": [],
|
||||
"speaker": [],
|
||||
"topic": [],
|
||||
"motion": [],
|
||||
"motion_submitter": [],
|
||||
"motion_comment": [],
|
||||
"motion_comment_section": [],
|
||||
"motion_category": [],
|
||||
"motion_block": [],
|
||||
"motion_change_recommendation": [],
|
||||
"motion_state": [
|
||||
{
|
||||
},
|
||||
"personal_note": {},
|
||||
"tag": {},
|
||||
"agenda_item": {},
|
||||
"list_of_speakers": {},
|
||||
"speaker": {},
|
||||
"topic": {},
|
||||
"motion": {},
|
||||
"motion_submitter": {},
|
||||
"motion_comment": {},
|
||||
"motion_comment_section": {},
|
||||
"motion_category": {},
|
||||
"motion_block": {},
|
||||
"motion_change_recommendation": {},
|
||||
"motion_state": {
|
||||
"1": {
|
||||
"id": 1,
|
||||
"name": "submitted",
|
||||
"recommendation_label": null,
|
||||
@ -480,7 +487,7 @@
|
||||
"first_state_of_workflow_id": 1,
|
||||
"meeting_id": 1
|
||||
},
|
||||
{
|
||||
"2": {
|
||||
"id": 2,
|
||||
"name": "accepted",
|
||||
"recommendation_label": "Acceptance",
|
||||
@ -503,7 +510,7 @@
|
||||
"first_state_of_workflow_id": null,
|
||||
"meeting_id": 1
|
||||
},
|
||||
{
|
||||
"3": {
|
||||
"id": 3,
|
||||
"name": "rejected",
|
||||
"recommendation_label": "Rejection",
|
||||
@ -526,7 +533,7 @@
|
||||
"first_state_of_workflow_id": null,
|
||||
"meeting_id": 1
|
||||
},
|
||||
{
|
||||
"4": {
|
||||
"id": 4,
|
||||
"name": "not decided",
|
||||
"recommendation_label": "No decision",
|
||||
@ -549,9 +556,9 @@
|
||||
"first_state_of_workflow_id": null,
|
||||
"meeting_id": 1
|
||||
}
|
||||
],
|
||||
"motion_workflow": [
|
||||
{
|
||||
},
|
||||
"motion_workflow": {
|
||||
"1": {
|
||||
"id": 1,
|
||||
"name": "Simple Workflow",
|
||||
"state_ids": [
|
||||
@ -566,16 +573,16 @@
|
||||
"default_statute_amendment_workflow_meeting_id": 1,
|
||||
"meeting_id": 1
|
||||
}
|
||||
],
|
||||
"motion_statute_paragraph": [],
|
||||
"poll": [],
|
||||
"option": [],
|
||||
"vote": [],
|
||||
"assignment": [],
|
||||
"assignment_candidate": [],
|
||||
"mediafile": [],
|
||||
"projector": [
|
||||
{
|
||||
},
|
||||
"motion_statute_paragraph": {},
|
||||
"poll": {},
|
||||
"option": {},
|
||||
"vote": {},
|
||||
"assignment": {},
|
||||
"assignment_candidate": {},
|
||||
"mediafile": {},
|
||||
"projector": {
|
||||
"1": {
|
||||
"id": 1,
|
||||
"name": "Default projector",
|
||||
"scale": 0,
|
||||
@ -632,11 +639,11 @@
|
||||
"used_as_default_$poll_in_meeting_id": 1,
|
||||
"meeting_id": 1
|
||||
}
|
||||
],
|
||||
"projection": [],
|
||||
"projector_message": [],
|
||||
"projector_countdown": [
|
||||
{
|
||||
},
|
||||
"projection": {},
|
||||
"projector_message": {},
|
||||
"projector_countdown": {
|
||||
"1": {
|
||||
"id": 1,
|
||||
"title": "List of speaker countdown",
|
||||
"description": "",
|
||||
@ -648,7 +655,7 @@
|
||||
"used_as_poll_countdown_meeting_id": null,
|
||||
"meeting_id": 1
|
||||
},
|
||||
{
|
||||
"2": {
|
||||
"id": 2,
|
||||
"title": "Voting countdown",
|
||||
"description": "",
|
||||
@ -660,6 +667,6 @@
|
||||
"used_as_poll_countdown_meeting_id": 1,
|
||||
"meeting_id": 1
|
||||
}
|
||||
],
|
||||
"chat_group": []
|
||||
},
|
||||
"chat_group": {}
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script sets password of user 1 (superadmin) to superadmin. You may also use the manage tool for this work.
|
||||
|
||||
set -e
|
||||
|
||||
# hash the new password
|
||||
response=$(docker-compose exec auth curl --header "Content-Type: application/json" -d '{"toHash": "admin"}' http://localhost:9004/internal/auth/hash)
|
||||
# Hash the new password
|
||||
response=$(docker-compose exec auth curl --header "Content-Type: application/json" -d '{"toHash": "superadmin"}' http://localhost:9004/internal/auth/hash)
|
||||
hash=$(jq .hash <<< $response)
|
||||
|
||||
# Set user/1/password to $hash
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
Subproject commit 367525f5d4312d6d300c23962f5b93de08afad6c
|
||||
Subproject commit 93cf85bc96a01da5291928531167ed43384d0960
|
@ -1 +1 @@
|
||||
Subproject commit 25233066f233eb00f53f8cc9d75546e0dfd6eebf
|
||||
Subproject commit 365ceb5b2431a3b0b976a237a9d779e949bcc095
|
Loading…
Reference in New Issue
Block a user