Skip to content

Commit

Permalink
REKDAT-179: Sysadmin-only organization member delete view
Browse files Browse the repository at this point in the history
  • Loading branch information
bzar committed Oct 1, 2024
1 parent 73b2365 commit 3a8ab1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ def get_auth_functions(self):
'member_delete': auth.member_delete,
'member_list': auth.member_list,
'organization_member_create': auth.sysadmin_only,
'organization_member_delete': auth.sysadmin_only,
'organization_member_list': auth.sysadmin_only,
'api_token_create': auth.sysadmin_only,
'user_list': auth.sysadmin_only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,5 +730,8 @@ def test_normal_user_has_no_access_to_organization_member_edit_pages(app):
result = client.get(toolkit.url_for("organization.member_new", id=organization['name']), headers=headers)
assert result.status_code == 403

result = client.get(toolkit.url_for("organization.member_delete", id=organization['name'], user=user["id"]), headers=headers)

Check failure on line 733 in ckan/ckanext/ckanext-restricteddata/ckanext/restricteddata/tests/test_plugin.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (E501)

ckan/ckanext/ckanext-restricteddata/ckanext/restricteddata/tests/test_plugin.py:733:128: E501 Line too long (129 > 127)
assert result.status_code == 403

result = client.get(toolkit.url_for("organization.members", id=organization['name']), headers=headers)
assert result.status_code == 403

0 comments on commit 3a8ab1c

Please sign in to comment.