Skip to content

Commit

Permalink
Merge pull request #137 from whdalsrnt/master
Browse files Browse the repository at this point in the history
refactor: change the sharing policy of public dashboard
  • Loading branch information
whdalsrnt authored Dec 23, 2024
2 parents f34f0ca + 2c49132 commit 054df94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/spaceone/dashboard/service/public_dashboard_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def create_dashboard(self, params_dict: dict) -> dict:
elif resource_group == "WORKSPACE":
if workspace_id := params_dict.get("workspace_id"):
self.identity_mgr.check_workspace(workspace_id, domain_id)
params_dict["project_id"] = "-"
params_dict["project_id"] = "*"
else:
raise ERROR_REQUIRED_PARAMETER(key="workspace_id")
else:
Expand Down Expand Up @@ -340,7 +340,7 @@ def share_dashboard(self, params_dict: dict) -> dict:
else:
updated_params["scope"] = "WORKSPACE"
elif pub_dashboard_vo.resource_group == "WORKSPACE":
updated_params["project_id"] = "*"
# updated_params["project_id"] = "*"
updated_params["scope"] = "PROJECT"
elif pub_dashboard_vo.resource_group == "PROJECT":
raise ERROR_PERMISSION_DENIED()
Expand Down Expand Up @@ -424,7 +424,7 @@ def unshare_dashboard(self, params_dict: dict) -> dict:
updated_params["project_id"] = "-"
updated_params["scope"] = None
elif pub_dashboard_vo.resource_group == "WORKSPACE":
updated_params["project_id"] = "-"
# updated_params["project_id"] = "-"
updated_params["scope"] = None
elif pub_dashboard_vo.resource_group == "PROJECT":
raise ERROR_PERMISSION_DENIED()
Expand Down

0 comments on commit 054df94

Please sign in to comment.