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):
|
def reset_workspace_role(role_id, workspace_id, role_dict):
|
||||||
if system_role_list.__contains__(role_id):
|
if system_role_list.__contains__(role_id):
|
||||||
if system_role == role_id:
|
if system_role == role_id:
|
||||||
return role_id
|
return [role_id]
|
||||||
else:
|
else:
|
||||||
return [f"{role_id}:/WORKSPACE/{workspace_id}", role_id]
|
return [f"{role_id}:/WORKSPACE/{workspace_id}", role_id]
|
||||||
else:
|
else:
|
||||||
@ -238,7 +238,7 @@ def reset_workspace_role(role_id, workspace_id, role_dict):
|
|||||||
return ''
|
return ''
|
||||||
role_type = role_dict.get(role_id).type
|
role_type = role_dict.get(role_id).type
|
||||||
if system_role == role_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}"]
|
return [f"EXTENDS_{role_type}:/WORKSPACE/{workspace_id}", f"EXTENDS_{role_type}"]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user