Skip to content

Commit 24afa1f

Browse files
♻️ Updates role inheritance for Admin role (ITISFoundation#8186)
1 parent 4eb6476 commit 24afa1f

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

services/web/server/src/simcore_service_webserver/security/_authz_access_roles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class PermissionDict(TypedDict, total=False):
120120
"resource-usage.write",
121121
"storage.files.sync",
122122
],
123-
inherits=[UserRole.TESTER],
123+
inherits=[UserRole.PRODUCT_OWNER],
124124
),
125125
}
126126

services/web/server/tests/unit/with_dbs/03/invitations/test_products_rest_invitations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
(UserRole.USER, status.HTTP_403_FORBIDDEN),
3535
(UserRole.TESTER, status.HTTP_403_FORBIDDEN),
3636
(UserRole.PRODUCT_OWNER, status.HTTP_200_OK),
37-
(UserRole.ADMIN, status.HTTP_403_FORBIDDEN),
37+
(UserRole.ADMIN, status.HTTP_200_OK),
3838
],
3939
)
4040
async def test_role_access_to_generate_invitation(

services/web/server/tests/unit/with_dbs/03/invitations/test_users_accounts_rest_registration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ async def mock_send_message(msg):
9595
*(
9696
(role, status.HTTP_403_FORBIDDEN)
9797
for role in UserRole
98-
if role not in {UserRole.PRODUCT_OWNER, UserRole.ANONYMOUS}
98+
if role not in {UserRole.PRODUCT_OWNER, UserRole.ADMIN, UserRole.ANONYMOUS}
9999
),
100100
(UserRole.PRODUCT_OWNER, status.HTTP_200_OK),
101+
(UserRole.ADMIN, status.HTTP_200_OK),
101102
],
102103
)
103104
async def test_access_rights_on_search_users_only_product_owners_can_access(

services/web/server/tests/unit/with_dbs/04/products/test_products_rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async def test_get_product_price_when_undefined(
5151
(UserRole.USER, status.HTTP_403_FORBIDDEN),
5252
(UserRole.TESTER, status.HTTP_403_FORBIDDEN),
5353
(UserRole.PRODUCT_OWNER, status.HTTP_200_OK),
54-
(UserRole.ADMIN, status.HTTP_403_FORBIDDEN),
54+
(UserRole.ADMIN, status.HTTP_200_OK),
5555
],
5656
)
5757
async def test_get_product_access_rights(

0 commit comments

Comments
 (0)