Skip to content

Commit e455535

Browse files
committed
missed during merging
1 parent 7bfb80e commit e455535

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ async def check_user_permission(
6060

6161
allowed = await aiohttp_security.api.permits(request, permission, context)
6262
if not allowed:
63-
raise web.HTTPForbidden(
64-
reason=f"You do not have sufficient access rights for {permission}"
65-
)
63+
msg = "You do not have sufficient access rights for"
64+
if permission == PERMISSION_PRODUCT_LOGIN_KEY:
65+
msg += f" {context.get('product_name')}"
66+
else:
67+
msg += f" {permission}"
68+
raise web.HTTPForbidden(reason=msg)
6669

6770

6871
#

0 commit comments

Comments
 (0)