Skip to content

Commit

Permalink
Merge pull request #339 from yjinjo/master
Browse files Browse the repository at this point in the history
Rollback role_binding_info to the dictionary in the workspace user
  • Loading branch information
yjinjo authored Sep 5, 2024
2 parents 306a0bc + 75bf889 commit d7cff23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions src/spaceone/identity/manager/workspace_user_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def get_workspace_user(

user_vo = self.user_mgr.get_user(user_id, domain_id)
user_info = user_vo.to_dict()
user_info["role_bindings_info"] = user_rb_map[user_id]
user_info["role_binding_info"] = user_rb_map[user_id]

return user_info

Expand All @@ -90,7 +90,7 @@ def list_workspace_users(
user_info = user_vo.to_dict()

if user_rb_map:
user_info["role_bindings_info"] = user_rb_map[user_vo.user_id]
user_info["role_binding_info"] = user_rb_map[user_vo.user_id]

users_info.append(user_info)

Expand Down Expand Up @@ -127,9 +127,6 @@ def _get_role_binding_map_in_workspace(

for rb_vo in rb_vos:
user_ids.append(rb_vo.user_id)
if user_rb_map.get(rb_vo.user_id):
user_rb_map[rb_vo.user_id].append(rb_vo.to_dict())
else:
user_rb_map[rb_vo.user_id] = [rb_vo.to_dict()]
user_rb_map[rb_vo.user_id] = rb_vo.to_dict()

return user_ids, user_rb_map
2 changes: 1 addition & 1 deletion src/spaceone/identity/model/workspace_user/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class WorkspaceUserResponse(BaseModel):
language: Union[str, None] = None
timezone: Union[str, None] = None
tags: Union[dict, None] = None
role_bindings_info: Union[List[RoleBindingResponse], None] = None
role_binding_info: Union[RoleBindingResponse, None] = None
domain_id: Union[str, None] = None
created_at: Union[datetime, None] = None
last_accessed_at: Union[datetime, None] = None
Expand Down

0 comments on commit d7cff23

Please sign in to comment.