Skip to content

Commit

Permalink
fix: update code when a user is a domain admin
Browse files Browse the repository at this point in the history
Signed-off-by: Youngjin Jo <[email protected]>
  • Loading branch information
yjinjo committed Sep 26, 2024
1 parent 7cf69c9 commit a65847e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/spaceone/identity/service/workspace_group_user_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,12 @@ def update_role(
params.workspace_group_id, params.domain_id
)

workspace_group_users = workspace_group_vo.users
self.workspace_group_user_mgr.check_user_role_type(
workspace_group_users, user_id, command="update_role"
)
user_vo = self.user_mgr.get_user(user_id, domain_id)
if user_vo.role_type == "USER":
workspace_group_users = workspace_group_vo.users
self.workspace_group_user_mgr.check_user_role_type(
workspace_group_users, user_id, command="update_role"
)

target_user_vo = self.user_mgr.get_user(target_user_id, domain_id)
target_user_state = target_user_vo.state
Expand Down

0 comments on commit a65847e

Please sign in to comment.