We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0c10ad commit a5a07cfCopy full SHA for a5a07cf
services/web/server/src/simcore_service_webserver/security/_authz_access_model.py
@@ -115,10 +115,11 @@ async def can(
115
check = role_access.check[operation]
116
try:
117
ok: bool
118
- if inspect.iscoroutinefunction(check):
119
- ok = await check(context)
+ coro_or_result = check(context)
+ if inspect.isawaitable(coro_or_result):
120
+ ok = await coro_or_result
121
else:
- ok = check(context)
122
+ ok = coro_or_result
123
return ok
124
125
except Exception: # pylint: disable=broad-except
0 commit comments