Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OIDC/Auth2 integration #2649

Open
wants to merge 91 commits into
base: feature/keycloak-oidc
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
3e8ce49
Bump debugpy from 1.8.5 to 1.8.6 in /requirements/partial (#2648)
dependabot[bot] Sep 26, 2024
8ac3dd3
change imports to os_authlib
boehlke Sep 24, 2024
8b3b009
Cleanup saml and auth service based code
boehlke Sep 25, 2024
8abec7b
cleanup
boehlke Sep 25, 2024
54c3b2c
Use pip-auth libraries code directly from local source
boehlke Sep 25, 2024
27594ea
Implement back-channel logout endpoint
boehlke Sep 27, 2024
221e2d8
2170 introduce gender model (#2485)
hjanott Sep 27, 2024
824386f
add new meeting specific setting hide metadata background for project…
hjanott Sep 27, 2024
ed82f6b
Allow to edit own delegation via user.update_self (#2632)
luisa-beerboom Sep 30, 2024
8d67a30
Update meta repository (#2653)
openslides-automation[bot] Oct 1, 2024
f9c8be0
migration to set default motion poll method (#2661)
hjanott Oct 8, 2024
f8ab039
Global enable anonymous (#2660)
luisa-beerboom Oct 8, 2024
d73953d
Update meta repository (#2665)
openslides-automation[bot] Oct 8, 2024
318cfbe
Ensure speaker.delete only resets projector countdown with active spe…
luisa-beerboom Oct 8, 2024
780eda0
Update meta repository (main) (#2670)
openslides-automation[bot] Oct 14, 2024
5a2412d
Bump black from 24.8.0 to 24.10.0 in /requirements/partial (#2668)
dependabot[bot] Oct 14, 2024
48ad18f
Change build scripts so that fullstack feature use-case (wiring own l…
boehlke Oct 14, 2024
ba000be
Update meta repository (#2672)
openslides-automation[bot] Oct 14, 2024
7325065
Bump types-redis in /requirements/partial (#2658)
dependabot[bot] Oct 14, 2024
f374182
Add stages for normal dev deps and fullstack dep resolution (local)
boehlke Oct 14, 2024
46914e5
Update meta repository (#2673)
openslides-automation[bot] Oct 15, 2024
990bf6c
Fix assignment_candidate cascade deletion error (#2662)
luisa-beerboom Oct 15, 2024
4733846
remove statute (amendments) (#2506)
hjanott Oct 15, 2024
fbab1b5
Update meta repository (#2680)
openslides-automation[bot] Oct 15, 2024
055cb83
Bump mypy from 1.11.2 to 1.12.0 in /requirements/partial (#2676)
dependabot[bot] Oct 15, 2024
fdb6824
Update meta repository (#2681)
openslides-automation[bot] Oct 15, 2024
5c7e05f
make meeting clone with gender in user possible again (#2678)
hjanott Oct 15, 2024
003bfe3
Fix action worker test (#2683)
luisa-beerboom Oct 16, 2024
50854d9
Bump debugpy from 1.8.6 to 1.8.7 in /requirements/partial (#2671)
dependabot[bot] Oct 16, 2024
6442a6b
fix participant import with meeting admin (#2684)
hjanott Oct 16, 2024
cce7b01
Bump pypdf[crypto] from 5.0.0 to 5.0.1 in /requirements/partial (#2654)
dependabot[bot] Oct 16, 2024
c185f00
Bump pyupgrade from 3.17.0 to 3.18.0 in /requirements/partial (#2675)
dependabot[bot] Oct 16, 2024
fdc2fd4
participant import error with gender and meeting admin (#2689)
hjanott Oct 16, 2024
f31358c
Move moderator_note to LoS (#2593)
luisa-beerboom Oct 17, 2024
7181278
Update meta repository (#2691)
openslides-automation[bot] Oct 17, 2024
0ff540a
Update meta repository (#2702)
openslides-automation[bot] Oct 28, 2024
d4eac2a
Fix mismatch of perm check of get-forwarding-meetings permissions and…
reiterl Oct 30, 2024
bd55095
KRY-149 migration script
boehlke Nov 4, 2024
ce0d124
Fix empty string translator (#2701)
luisa-beerboom Nov 6, 2024
e2c091a
More email placeholders (#2679)
luisa-beerboom Nov 6, 2024
9bbed16
Add user_id to action_worker (#2717)
luisa-beerboom Nov 7, 2024
f2942ff
Update meta repository (#2719)
openslides-automation[bot] Nov 7, 2024
24d913d
Don't wait for DS if ANONYMOUS_ONLY=1 (#2713)
peb-adr Nov 8, 2024
ed34503
Update export_service_commits.sh to new datastore commit (#2716)
hjanott Nov 8, 2024
9996193
Case insensitive email matching for forget password (#2698)
luisa-beerboom Nov 11, 2024
7abf5f6
Bump mypy from 1.12.0 to 1.13.0 in /requirements/partial (#2700)
dependabot[bot] Nov 11, 2024
ae316b6
Bump pyupgrade from 3.18.0 to 3.19.0 in /requirements/partial (#2699)
dependabot[bot] Nov 11, 2024
0387c08
Bump types-requests in /requirements/partial (#2688)
dependabot[bot] Nov 11, 2024
1120121
Update meta repository (#2725)
openslides-automation[bot] Nov 11, 2024
688fdb7
Bump debugpy from 1.8.7 to 1.8.8 in /requirements/partial (#2720)
dependabot[bot] Nov 11, 2024
4d786d0
Bump pytest-cov from 5.0.0 to 6.0.0 in /requirements/partial (#2708)
dependabot[bot] Nov 11, 2024
e16f70d
Bump dependency-injector from 4.42.0 to 4.43.0 in /requirements/parti…
dependabot[bot] Nov 11, 2024
936a4cc
Bump types-beautifulsoup4 in /requirements/partial (#2693)
dependabot[bot] Nov 11, 2024
b1fe083
Bump opentelemetry dependencies update datastore and auth hashes (#2726)
luisa-beerboom Nov 11, 2024
45bdd24
Bump pypdf[crypto] from 5.0.1 to 5.1.0 in /requirements/partial (#2705)
dependabot[bot] Nov 12, 2024
cb07383
Bump bleach[css] from 6.1.0 to 6.2.0 in /requirements/partial (#2709)
dependabot[bot] Nov 12, 2024
b5921c5
Check for poll permission correctly (#2622)
luisa-beerboom Nov 13, 2024
efdc419
Work on deeper authlib integration
boehlke Oct 7, 2024
68549f9
Replace os_authlib with authlib
boehlke Oct 10, 2024
e0687e0
Work on deeper integration of keycloak and dev reviews
boehlke Nov 4, 2024
92bd338
WIP: Work on keycloak service for migration and other features needin…
boehlke Nov 6, 2024
7d0685c
Revert
boehlke Nov 10, 2024
d21d2e2
Scatch implementation of idp migration
boehlke Nov 10, 2024
dca8b9f
Work on actions
boehlke Nov 12, 2024
cf020c4
Agenda item permission checks for motion.create (#2728)
luisa-beerboom Nov 20, 2024
dec9a05
beautify presenter docs (#2732)
hjanott Nov 25, 2024
1bdd315
remove participant presence status when removed from meeting (#2730)
hjanott Nov 25, 2024
deac9e1
new saml meeting mapping (#2722)
hjanott Nov 25, 2024
c13b26f
Allow meeting admin user to update a non admin user that shares all h…
hjanott Nov 25, 2024
d077332
Bump werkzeug from 3.0.4 to 3.1.3 in /requirements/partial (#2721)
dependabot[bot] Nov 25, 2024
5e8f153
Remove motion import (#2736)
luisa-beerboom Nov 25, 2024
3ef9052
Update debugpy and datastore commit hash (#2738)
luisa-beerboom Nov 26, 2024
a2d779e
make database check work again (#2747)
hjanott Nov 29, 2024
eb967ae
Translate public group name (#2748)
luisa-beerboom Dec 3, 2024
c6b2499
Specify motion.create functionality concerning additional_submitter …
luisa-beerboom Dec 3, 2024
0abf8c3
saml-meeting-mapping: allow boolean attributes and vote weight as str…
hjanott Dec 3, 2024
f282173
Put all candidates on the LOS when setting phase to voting dependant …
luisa-beerboom Dec 5, 2024
a352769
Update meta repository (#2758)
openslides-automation[bot] Dec 5, 2024
117b317
Kill all sessions of user set to inactive (#2752)
hjanott Dec 6, 2024
2fae794
Update issue templates for bugs (#2762)
rrenkert Dec 9, 2024
21b797c
Work on keycloak integration
boehlke Dec 10, 2024
e48e5fc
Re-add actions
boehlke Dec 12, 2024
7101083
Allow submitter ids and additional submitter on motion create (#2766)
hjanott Dec 17, 2024
7bf782c
Forbid unreasonable vote amounts in poll (#2772)
hjanott Dec 18, 2024
d578f5b
Ignore assignment candidates already on list of speakers on phase to …
hjanott Dec 18, 2024
40c373f
Merge remote-tracking branch 'refs/remotes/source/main' into KRY-149
boehlke Dec 20, 2024
699a693
Work on keycloak authenticator
boehlke Dec 23, 2024
6e1f381
Work on keycloak authenticator
boehlke Jan 8, 2025
115560f
Work on keycloak integration
boehlke Sep 25, 2024
e4e35ba
deactivate migration, merge main
boehlke Jan 10, 2025
daf7c1f
Fix merge bug
boehlke Jan 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**

**How To Reproduce**

**Payload from client (handle_request)**

**Response from backend**

**Expected behavior**

**Additional context**
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,12 @@ run-dev-otel run-bash-otel: | start-dev-otel run-dev-attach-otel
build-dev:
docker build --file=dev/Dockerfile.dev . --tag=openslides-backend-dev

build-dev-fullstack:
DOCKER_BUILDKIT=1 docker build --file=dev/Dockerfile.dev . \
--build-arg=REQUIREMENTS_FILE=requirements_development_fullstack.txt \
--build-context pipauth=../openslides-auth-service/libraries/pip-auth \
--build-context datastore=../openslides-datastore-service \
--tag=openslides-backend-dev-fullstack

rebuild-dev:
docker build --file=dev/Dockerfile.dev . --tag=openslides-backend-dev --no-cache
docker build --file=dev/Dockerfile.dev . --target development --tag=openslides-backend-dev --no-cache
20 changes: 15 additions & 5 deletions dev/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
FROM python:3.10.13-slim-bookworm
FROM python:3.10.13-slim-bookworm as base

RUN apt-get update && apt-get install --yes make git curl ncat vim bash-completion mime-support gcc libpq-dev libmagic1

WORKDIR /app

COPY requirements/ requirements/
ARG REQUIREMENTS_FILE=requirements_development.txt
RUN . requirements/export_service_commits.sh && pip install --no-cache-dir --requirement requirements/$REQUIREMENTS_FILE

COPY dev/.bashrc .
COPY dev/cleanup.sh .

Expand Down Expand Up @@ -42,3 +38,17 @@ ENV DEFAULT_FROM_EMAIL [email protected]
STOPSIGNAL SIGKILL
ENTRYPOINT ["./entrypoint.sh"]
CMD exec python -m debugpy --listen 0.0.0.0:5678 openslides_backend

FROM base AS development

COPY requirements/ requirements/
ARG REQUIREMENTS_FILE=requirements_development.txt
RUN . requirements/export_service_commits.sh && pip install --no-cache-dir --requirement requirements/$REQUIREMENTS_FILE

FROM base AS development-fullstack

COPY --from=pipauth / /pip-auth
COPY --from=datastore / /openslides-datastore-service
COPY requirements/ requirements/
ARG REQUIREMENTS_FILE=requirements_development.txt
RUN . requirements/export_service_commits.sh && pip install --no-cache-dir --requirement requirements/$REQUIREMENTS_FILE
5 changes: 1 addition & 4 deletions dev/dc.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- REQUIREMENTS_FILE=requirements_development_local.txt
volumes:
- ../../openslides-datastore-service/:/datastore-service
- ../../openslides-auth-service/auth/libraries/pip-auth/:/authlib
- ../../openslides-auth-service/libraries/pip-auth/:/authlib
environment:
- PYTHONPATH=/app:/datastore-service:/authlib
- MYPYPATH=/app:/datastore-service:/authlib
Expand All @@ -34,6 +34,3 @@ services:
vote:
build:
context: ../../openslides-vote-service
auth:
build:
context: ../../openslides-auth-service
41 changes: 21 additions & 20 deletions dev/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ services:
- CACHE_HOST=redis
- DATABASE_HOST=postgres
- DATASTORE_LOG_LEVEL=CRITICAL
- OPENSLIDES_KEYCLOAK_URL=http://keycloak:8080/idp
- OPENSLIDES_AUTH_REALM=os
- OPENSLIDES_AUTH_CLIENT_ID=os-ui
- OPENSLIDES_TOKEN_ISSUER=http://keycloak:8080/idp/auth/realms/os
- OPENSLIDES_KEYCLOAK_ADMIN_USERNAME=admin
- OPENSLIDES_KEYCLOAK_ADMIN_PASSWORD=admin
depends_on:
- datastore-writer
datastore-reader:
Expand Down Expand Up @@ -58,26 +64,21 @@ services:
depends_on:
- postgres
- redis
auth:
build:
context: "https://github.com/OpenSlides/openslides-auth-service.git#main"
dockerfile: "Dockerfile.dev"
image: openslides-auth-dev
ports:
- "9004:9004"

keycloak:
# build:
# context: "https://github.com/OpenSlides/openslides-auth-service.git#main/keycloak"
image: openslides-keycloak-dev
environment:
- ACTION_HOST=backend
- ACTION_PORT=9002
- MESSAGE_BUS_HOST=redis
- CACHE_HOST=redis
- DATASTORE_READER_HOST=datastore-reader
- DATASTORE_READER_PORT=9010
- DATASTORE_WRITER_HOST=datastore-writer
- DATASTORE_WRITER_PORT=9011
depends_on:
- datastore-reader
- datastore-writer
- redis
- KC_BOOTSTRAP_ADMIN_USERNAME=admin
- KC_BOOTSTRAP_ADMIN_PASSWORD=admin
- JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
- KEYCLOAK_HOSTNAME=http://keycloak:8080/idp/
- KEYCLOAK_HTTP_RELATIVE_PATH=/idp/
ports:
- 18080:8080
- 15005:5005

vote:
build:
context: "https://github.com/OpenSlides/openslides-vote-service.git#main"
Expand All @@ -96,7 +97,7 @@ services:
depends_on:
- datastore-reader
- redis
- auth
- keycloak
postgres:
image: postgres:15
environment:
Expand Down
2 changes: 1 addition & 1 deletion dev/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DC="docker compose -f dev/docker-compose.dev.yml"
$DC up --build --detach
$DC exec -T backend scripts/wait.sh datastore-writer 9011
$DC exec -T backend scripts/wait.sh datastore-reader 9010
$DC exec -T backend scripts/wait.sh auth 9004
$DC exec -T backend scripts/wait.sh keycloak 8080
$DC exec -T backend ./entrypoint.sh pytest --cov
error=$?
$DC down --volumes
Expand Down
11 changes: 6 additions & 5 deletions docs/Actions-Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ A more general format description see in [Action-Service](https://github.com/Ope
- [motion_comment_section.delete](actions/motion_comment_section.delete.md)
- [motion_comment_section.sort](actions/motion_comment_section.sort.md)
- [motion_comment_section.update](actions/motion_comment_section.update.md)
- [motion_statute_paragraph.create](actions/motion_statute_paragraph.create.md)
- [motion_statute_paragraph.delete](actions/motion_statute_paragraph.delete.md)
- [motion_statute_paragraph.sort](actions/motion_statute_paragraph.sort.md)
- [motion_statute_paragraph.update](actions/motion_statute_paragraph.update.md)
- [motion_submitter.create](actions/motion_submitter.create.md)
- [motion_submitter.delete](actions/motion_submitter.delete.md)
- [motion_submitter.sort](actions/motion_submitter.sort.md)
Expand Down Expand Up @@ -207,6 +203,12 @@ A more general format description see in [Action-Service](https://github.com/Ope
- [theme.delete](actions/theme.delete.md)
- [theme.update](actions/theme.update.md)

## Gender

- [gender.create](actions/theme.create.md)
- [gender.delete](actions/theme.delete.md)
- [gender.update](actions/theme.update.md)

## Topics

- [topic.create](actions/topic.create.md)
Expand All @@ -231,7 +233,6 @@ A more general format description see in [Action-Service](https://github.com/Ope
- [user.toggle_presence_by_number](actions/user.toggle_presence_by_number.md)
- [user.update](actions/user.update.md)
- [user.update_self](actions/user.update_self.md)
- [user.save_saml_account](actions/user.save_saml_account.md)
- [meeting_user.create](actions/meeting_user.create.md)
- [meeting_user.update](actions/meeting_user.update.md)
- [meeting_user.delete](actions/meeting_user.delete.md)
Expand Down
1 change: 1 addition & 0 deletions docs/Presenters-Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Available presenters:
- [get_forwarding_meetings](presenters/get_forwarding_meetings.md)
- [get_meetings](presenters/get_meetings.md)
- [get_users](presenters/get_users.md)
- [get_user_editable](presenters/get_user_editable.md)
- [get_user_related_models](presenters/get_user_related_models.md)
- [get_user_scope](presenters/get_user_scope.md)
- [search_deleted_models](presenters/search_deleted_models.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/account.import.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Payload
```js
```
{
// required
id: Id; // action worker id
Expand Down
16 changes: 8 additions & 8 deletions docs/actions/account.json_upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Because the data fields are all converted from CSV import file, **they are all of type `string`**.
The types noted below are the internal types after conversion in the backend. See [here](preface_special_imports.md#internal-types) for the representation of the types.
```js
```
{
// required
data: {
Expand All @@ -14,12 +14,12 @@ The types noted below are the internal types after conversion in the backend. Se
member_number: string, // unique member_number, info: done (used as matching field), new (newly added) or error
title: string,
pronoun: string,
gender: string, // as defined in organization/genders, info: done or warning
gender: string, // info: done or warning
default_password: string, // info: generated, done or warning
is_active: boolean,
is_physical_person: boolean,
default_vote_weight: decimal(6), // info: done or error
saml_id: string, // unique saml_id, info: new, done or error
idp_id: string, // unique idp_id, info: new, done or error
}[];
}
```
Expand All @@ -29,8 +29,8 @@ Besides the usual headers as seen in payload (name and type), there are these di

- General user fields (shared between all user imports):
- `username`: object with info "generated", "new" or "done", depending on whether the username was generated or not. The username may be overwritten when matching via the `member_nubmer`, then the info will be "new"
- `saml_id`: object with info "new" if set for the first time or "done" if changed. "error" will be reported on duplicate "saml_ids.
- `default_password`: object with info "generated" or "done", depending on whether the default_password was generated or not. The info "warning" signalizes, that `default_password`, `password` and `can_change_own_password` will be removed by setting `saml_id`, because local login will not be possible anymore.
- `idp_id`: object with info "new" if set for the first time or "done" if changed. "error" will be reported on duplicate "idp_ids.
- `default_password`: object with info "generated" or "done", depending on whether the default_password was generated or not. The info "warning" signalizes, that `default_password`, `password` and `can_change_own_password` will be removed by setting `idp_id`, because local login will not be possible anymore.
- `email` must be a valid email
- `member_number`: object with info "new" or "done", depending on whether the member number will be newly added to an existing user or not. Overwriting a pre-existing value is not permitted and "error" will be used if it is tried. "error" will also be used if the member_number is not unique or matches a different user than the other matching criteria
- `default_vote_weight` doesn't allow 0 values
Expand All @@ -52,16 +52,16 @@ To decide whether to update an existing user with a row or to create a new one,

If nothing is found in this manner, a matching user will be sought analogously to the [`search_users` presenter](search_users.md#logic):
- If `username` is provided, it is only matched by username. All other data is ignored for the matching. If the username does not exist yet, a new username is created.
- If `saml_id` is provided, it is only matched by saml_id. All other data is ignored for the matching. If the saml_id does not exist yet, a new user is created. If found add a new column with the Id to the data.
- If `username` and `saml_id` are not provided, all of `first_name`, `last_name` and `email` must be provided instead. A user matches the row if all three fields are equal. In this case fill the `username` in data from db and a also add a column with the Id to data. If no user is found which matches the data, a new user is created and a username generated.
- If `idp_id` is provided, it is only matched by idp_id. All other data is ignored for the matching. If the idp_id does not exist yet, a new user is created. If found add a new column with the Id to the data.
- If `username` and `idp_id` are not provided, all of `first_name`, `last_name` and `email` must be provided instead. A user matches the row if all three fields are equal. In this case fill the `username` in data from db and a also add a column with the Id to data. If no user is found which matches the data, a new user is created and a username generated.

If the user is found, a new column with the Id is added to the data and to the object in the main matching field by which the import of the row will be calculated:
- `member_number` if the user was matched via `member_number`
- else `username`

One of these cases must be true. If fewer fields are given than necessary (e.g. `first_name` is missing), no matching to existing users is done at all. Instead, a new user is created and a username generated. If both `first_name` and `last_name` are missing, the row is invalid since no username can be generated.

If `saml_id` is given, there may be no password, default_password or can_change_own_password for local user access set.
If `idp_id` is given, there may be no password, default_password or can_change_own_password for local user access set.

## Permission
Organization management level `can_manage_users`
4 changes: 1 addition & 3 deletions docs/actions/agenda_item.create.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
duration: number; // in seconds
weight: number;
tag_ids: Id[];
moderator_notes: HTML;
}
```

Expand All @@ -23,5 +22,4 @@ item or the content object cannot have an agenda item (see available collections
`models.yml`). `tag_ids` must be from the same meeting.

## Permissions
The request user needs `agenda_item.can_manage_moderator_notes` to set `moderator_notes` and
`agenda_item.can_manage` for all other fields.
The request user needs `agenda_item.can_manage`.
5 changes: 2 additions & 3 deletions docs/actions/agenda_item.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
duration: number; // in minutes
weight: number;
tag_ids: Id[];
moderator_notes: HTML;
}
```

Expand All @@ -21,5 +20,5 @@ Updates the agenda item. `tag_ids` must be from the same meeting.
The `type` attribute of one `agenda_item` must be one of [`common`, `internal`, `hidden`].

## Permissions
The request user needs `agenda_item.can_manage_moderator_notes` to set `moderator_notes` and
`agenda_item.can_manage` for all other fields.
The request user needs `agenda_item.can_manage`.

2 changes: 2 additions & 0 deletions docs/actions/assignment.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@
## Action
Updates an assignment.

If phase is newly set to `voting`, the candidates of the assignment are put in the assignments `list_of_speakers` if they are not already.

## Permissions
The user needs `assignment.can_manage`.
2 changes: 1 addition & 1 deletion docs/actions/assignment_candidate.delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
```

## Action
Deletes an assignment candidate for the assignment. It is forbidden to remove a candidate from a finished assignment.
Deletes an assignment candidate for the assignment. It is forbidden to remove a candidate from a finished assignment if the action is called externally.

## Permissions
If the `assignment_candidate/user_id` is equal to the request user id, the user needs `assignment.can_nominate_self`, else the user needs `assignment.can_nominate_other`.
Expand Down
2 changes: 1 addition & 1 deletion docs/actions/committee.json_upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The data, enriched with building some field values and a first new column "state

### User matching

The users given in `managers` and `meeting_admins` will be matched only by username. The `saml_id` will not be used for the search.
The users given in `managers` and `meeting_admins` will be matched only by username. The `idp_id` will not be used for the search.

## Permission

Expand Down
13 changes: 13 additions & 0 deletions docs/actions/gender.create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Payload
```
{
// Required
name: string;
}
```

## Action
Creates the gender if a gender with the same name doesn't exist.

## Permissions
The user needs to have the organization management level `can_manage_organization`.
13 changes: 13 additions & 0 deletions docs/actions/gender.delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Payload
```
{
//Required
id: Id;
}
```

## Action
Deletes the gender if it is not one of the four default genders.

## Permissions
The user needs to have the organization management level `can_manage_organization`.
15 changes: 15 additions & 0 deletions docs/actions/gender.update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Payload
```
{
// Required
id: Id;
// Group A
name: string;
}
```

## Action
Updates the gender if a gender with that name does not exist and is not one of the four default genders.

## Permissions
- Group A: The user needs the OML `can_manage_organization`
2 changes: 1 addition & 1 deletion docs/actions/group.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Updates the group. Permissions are restricted to the following enum: https://git
If the group is the meetings anonymous group, the name may not be changed and the permissions have to be in the following whitelist:
- agenda_item.can_see,
- agenda_item.can_see_internal,
- agenda_item.can_see_moderator_notes,
- assignment.can_see,
- list_of_speakers.can_see,
- list_of_speakers.can_see_moderator_notes,
- mediafile.can_see,
- meeting.can_see_autopilot,
- meeting.can_see_frontpage,
Expand Down
4 changes: 3 additions & 1 deletion docs/actions/list_of_speakers.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@

// Optional
closed: boolean;
moderator_notes: HTML;
}
```

## Action
Updates a list of speakers.

## Permissions
The request user needs `list_of_speakers.can_manage`.
The request user needs `list_of_speakers.can_manage_moderator_notes` to set `moderator_notes` and
`list_of_speakers.can_manage` for all other fields.
2 changes: 1 addition & 1 deletion docs/actions/meeting.create.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ When creating a meeting the following objects have to be created, too:
- Groups: `Default`, `Admin`, `Delegates`, `Staff`, `Committees`. The first one is set as `meeting/default_group_id`, the second one as `meeting/admin_group_id`. The permissions can be found in the [initial-data.json](https://github.com/OpenSlides/openslides-backend/tree/main/global/data/initial-data.json)).
- Projector: One projector named `"Default projector"` must be created and set as `meeting/reference_projector_id`.
- All default projectors (`meeting/default_projector_*_ids`, see `models.yml`) must be set to the one projector
- Motion workflow and states: Create one workflow `"simple workflow"` which is set as `meeting/motions_default_workflow_id`, `meeting/motions_default_amendment_workflow_id` and `meeting/motions_default_statute_amendment_workflow_id`. Create four states (analog as in the [initial-data.json](https://github.com/OpenSlides/openslides-backend/tree/main/global/data/initial-data.json)).
- Motion workflow and states: Create one workflow `"simple workflow"` which is set as `meeting/motions_default_workflow_id` and `meeting/motions_default_amendment_workflow_id`. Create four states (analog as in the [initial-data.json](https://github.com/OpenSlides/openslides-backend/tree/main/global/data/initial-data.json)).
- Two countdowns are created and set as `meeting/list_of_speakers_countdown` (name: "List of speakers countdown") and `meeting/voting_countdown` (name: "Voting countdown").

If `user_ids` are given, it must be checked that it is a subset of `committee/user_ids`. Each user is added to the meeting by being added to the default group.
Expand Down
Loading
Loading