Skip to content

Commit

Permalink
feature: 部分资源权限审批人切换为实例所有者 (closed #1184)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhuoZhuoCrayon committed Oct 25, 2022
1 parent 960e33b commit 14ced40
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 9 additions & 5 deletions apps/node_man/iam_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,15 @@ def fetch_strategy(self, condition=None):
else:
condition.update(init_condition)

result = [
{"id": strategy["id"], "display_name": strategy["name"]}
for strategy in list(Subscription.objects.filter(**condition).values("id", "name"))
]
# result.insert(0, {"id": DEFAULT_CLOUD, "display_name": _("直连区域")})
result = []
for strategy in list(Subscription.objects.filter(**condition).values("id", "name", "creator")):
result.append(
{
"id": strategy["id"],
"display_name": strategy["name"],
"_bk_iam_approver_": strategy,
}
)
return result

def list_attr(self, **options):
Expand Down
3 changes: 3 additions & 0 deletions dev_log/2.2.30/crayon_202210250952.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
feature:
- "部分资源权限审批人切换为实例所有者 (closed #1184)"

0 comments on commit 14ced40

Please sign in to comment.