Skip to content

Commit

Permalink
feat: update resource creator action api never expire (#2625)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu327 authored Apr 17, 2024
1 parent 7841450 commit 125e006
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions saas/backend/trans/open_authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from backend.biz.action import ActionBiz
from backend.biz.policy import PolicyBeanList
from backend.common.error_codes import error_codes
from backend.common.time import PERMANENT_SECONDS

from .open import OpenCommonTrans, OpenPolicy

Expand Down Expand Up @@ -211,7 +212,7 @@ def to_policy_list_for_instances_of_creator(
for open_policy in open_policies:
open_policy.fill_instance_name()

return self._to_policy_list(system_id, open_policies)
return self._to_policy_list(system_id, open_policies, expired_at=PERMANENT_SECONDS)

def to_policy_list_for_attributes_of_creator(
self, system_id: str, action_ids: List[str], resource_type_id: str, attributes: List[Dict]
Expand Down Expand Up @@ -240,4 +241,4 @@ def to_policy_list_for_attributes_of_creator(
# 将数据转换为OpenPolicy用于后续处理
open_policies = parse_obj_as(List[OpenPolicy], actions)

return self._to_policy_list(system_id, open_policies)
return self._to_policy_list(system_id, open_policies, expired_at=PERMANENT_SECONDS)

0 comments on commit 125e006

Please sign in to comment.