pref(api): import and export of CIType templates

pref(api): import and export of CIType templates
This commit is contained in:
pycook
2023-12-22 14:32:03 +08:00
committed by GitHub
parent 5279d96c84
commit 1da629b877
11 changed files with 363 additions and 159 deletions

View File

@@ -143,11 +143,14 @@ class CIFilterPermsCRUD(DBMixin):
first=True, to_dict=False)
if obj is not None:
resource = None
if current_app.config.get('USE_ACL'):
ACLManager().del_resource(str(obj.id), ResourceTypeEnum.CI_FILTER)
resource = ACLManager().del_resource(str(obj.id), ResourceTypeEnum.CI_FILTER)
obj.soft_delete()
return resource
def has_perm_for_ci(arg_name, resource_type, perm, callback=None, app=None):
def decorator_has_perm(func):