Skip to content

Commit

Permalink
Fix meeting update group D
Browse files Browse the repository at this point in the history
  • Loading branch information
luisa-beerboom committed Feb 5, 2025
1 parent 02dadcd commit 495b5a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openslides_backend/permissions/permission_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def is_admin(datastore: DatastoreService, user_id: int, meeting_id: int) -> bool
lock_result=False,
)
if not meeting.get("locked_from_inside") and has_organization_management_level(
datastore, user_id, OrganizationManagementLevel.SUPERADMIN
datastore, user_id, OrganizationManagementLevel.CAN_MANAGE_ORGANIZATION
):
return True

Expand Down
7 changes: 5 additions & 2 deletions tests/system/action/meeting/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,11 @@ def test_update_group_d_orga_permissions(self) -> None:
"meeting.update",
{"id": 1, "enable_anonymous": True},
)
self.assert_status_code(response, 403)
assert "Missing permission:" in response.json["message"]
self.assert_status_code(response, 200)
self.assert_model_exists(
"meeting/1",
{"enable_anonymous": True},
)

def test_update_group_d_permissions(self) -> None:
self.create_meeting()
Expand Down

0 comments on commit 495b5a9

Please sign in to comment.