mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: adapt UGs to roles
This commit is contained in:
parent
0df250c729
commit
a6152ef1f5
9 changed files with 265 additions and 70 deletions
|
|
@ -453,7 +453,7 @@ async def authorize_user_action(
|
|||
request: Request,
|
||||
db_session: Session,
|
||||
current_user: PublicUser | AnonymousUser,
|
||||
ressource_uuid: str,
|
||||
resource_uuid: str,
|
||||
action: Literal["create", "read", "update", "delete"],
|
||||
):
|
||||
# Get user
|
||||
|
|
@ -468,7 +468,7 @@ async def authorize_user_action(
|
|||
|
||||
# RBAC check
|
||||
authorized = await authorization_verify_based_on_roles_and_authorship_and_usergroups(
|
||||
request, current_user.id, action, ressource_uuid, db_session
|
||||
request, current_user.id, action, resource_uuid, db_session
|
||||
)
|
||||
|
||||
if authorized:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue