Skip to content

Commit

Permalink
fix: 处理公共流程鉴权没有传 project_id 的问题 #ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
normal-wls committed May 30, 2024
1 parent 8614327 commit 67f5f6d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gcloud/core/apis/drf/viewsets/taskflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,11 @@ def retrieve(self, request, *args, **kwargs):
template_id__allowed_actions_map = {}

if data["template_source"] == COMMON:
template_id__allowed_actions_map = get_common_flow_allowed_actions_for_user(
template_id__allowed_actions_map = get_common_flow_allowed_actions_for_user_and_project(
request.user.username,
[IAMMeta.COMMON_FLOW_VIEW_ACTION, IAMMeta.COMMON_FLOW_CREATE_ACTION],
[data["template_id"]],
str(instance.project_id),
)
elif data["template_source"] == PROJECT:
template_id__allowed_actions_map = get_flow_allowed_actions_for_user(
Expand Down

0 comments on commit 67f5f6d

Please sign in to comment.