Skip to content

Commit

Permalink
fix: 资源反向拉取增加ancestors过滤字段
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Nov 9, 2023
1 parent 2a98f1a commit e6c9301
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions iam/contrib/django/dispatcher/dispatchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ def _dispatch_list_attr_value(self, request, data, request_id):
def _dispatch_list_instance(self, request, data, request_id):
options = self._get_options(request)

filter_obj = get_filter_obj(data.get("filter"), ["parent", "search", "action", "resource_type_chain"])
filter_obj = get_filter_obj(
data.get("filter"), ["parent", "search", "action", "resource_type_chain", "ancestors"]
)
page_obj = get_page_obj(data.get("page"))

provider = self._provider[data["type"]]
Expand Down Expand Up @@ -198,7 +200,7 @@ def _dispatch_list_instance_by_policy(self, request, data, request_id):
def _dispatch_search_instance(self, request, data, request_id):
options = self._get_options(request)

filter_obj = get_filter_obj(data.get("filter"), ["parent", "action", "keyword"])
filter_obj = get_filter_obj(data.get("filter"), ["parent", "action", "keyword", "ancestors"])

if filter_obj.keyword is None or len(filter_obj.keyword) < 2:
raise KeywordTooShortException("the length of keyword should be greater than or equals to 2")
Expand Down

0 comments on commit e6c9301

Please sign in to comment.