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

Allow additional submitters update with CAN_MANAGE_METADATA #2439

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions docs/actions/motion.update.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ If the request user does not have `motion.can_manage`, the fields in the payload
* `motion_block_id`
* `origin`
* `supporter_meeting_user_ids`
* `additional_submitter`
* `recommendation_extension`
* `start_line_number`
* `workflow_timestamp`
1 change: 1 addition & 0 deletions openslides_backend/action/actions/motion/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def check_permissions(self, instance: dict[str, Any]) -> None:
"category_id",
"block_id",
"supporter_meeting_user_ids",
"additional_submitter",
"recommendation_extension",
"start_line_number",
"tag_ids",
Expand Down
4 changes: 2 additions & 2 deletions openslides_backend/presenter/get_forwarding_committees.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def get_result(self) -> Any:
if not has_perm(
self.datastore,
self.user_id,
Permissions.Motion.CAN_MANAGE,
Permissions.Motion.CAN_MANAGE_METADATA,
self.data["meeting_id"],
):
msg = "You are not allowed to perform presenter get_forwarding_committees"
msg += f" Missing permission: {Permissions.Motion.CAN_MANAGE}"
msg += f" Missing permission: {Permissions.Motion.CAN_MANAGE_METADATA}"
bastianjoel marked this conversation as resolved.
Show resolved Hide resolved
raise PermissionDenied(msg)

meeting = self.datastore.get(
Expand Down
2 changes: 2 additions & 0 deletions tests/system/action/motion/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def test_update_correct_2(self) -> None:
"category_id": 4,
"block_id": 51,
"supporter_meeting_user_ids": [],
"additional_submitter": "additional",
"tag_ids": [],
"attachment_ids": [],
"workflow_timestamp": 9876543210,
Expand All @@ -249,6 +250,7 @@ def test_update_correct_2(self) -> None:
assert model.get("category_id") == 4
assert model.get("block_id") == 51
assert model.get("supporter_meeting_user_ids") == []
assert model.get("additional_submitter") == "additional"
assert model.get("tag_ids") == []
assert model.get("attachment_ids") == []
# motion/113 does not exist and should therefore not be present in the relations
Expand Down