mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 09:43:10 +00:00
fix: role user permission (#3453)
This commit is contained in:
parent
25125ca571
commit
191e62f96d
|
|
@ -229,7 +229,7 @@ system_role = RoleConstants.ADMIN.value.name
|
|||
def reset_workspace_role(role_id, workspace_id, role_dict):
|
||||
if system_role_list.__contains__(role_id):
|
||||
if system_role == role_id:
|
||||
return role_id
|
||||
return [role_id]
|
||||
else:
|
||||
return [f"{role_id}:/WORKSPACE/{workspace_id}", role_id]
|
||||
else:
|
||||
|
|
@ -238,7 +238,7 @@ def reset_workspace_role(role_id, workspace_id, role_dict):
|
|||
return ''
|
||||
role_type = role_dict.get(role_id).type
|
||||
if system_role == role_type:
|
||||
return RoleConstants.EXTENDS_ADMIN.value.name
|
||||
return [RoleConstants.EXTENDS_ADMIN.value.name]
|
||||
return [f"EXTENDS_{role_type}:/WORKSPACE/{workspace_id}", f"EXTENDS_{role_type}"]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue