Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollback role_binding_info to the dictionary in the workspace user #339

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading