mirror of https://github.com/veops/cmdb.git
fix delete relation view
This commit is contained in:
parent
18122de03e
commit
e129b0a32e
|
@ -131,6 +131,11 @@ class CITypeManager(object):
|
||||||
|
|
||||||
CITypeCache.clean(type_id)
|
CITypeCache.clean(type_id)
|
||||||
|
|
||||||
|
if current_app.config.get("USE_ACL"):
|
||||||
|
from api.lib.perm.acl.acl import ACLManager
|
||||||
|
from api.lib.cmdb.const import ResourceTypeEnum, RoleEnum, PermEnum
|
||||||
|
ACLManager().del_resource(ci_type.name, ResourceTypeEnum.CI)
|
||||||
|
|
||||||
|
|
||||||
class CITypeGroupManager(object):
|
class CITypeGroupManager(object):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
@ -192,4 +192,7 @@ class PreferenceManager(object):
|
||||||
for existed in PreferenceRelationView.get_by(name=name, to_dict=False):
|
for existed in PreferenceRelationView.get_by(name=name, to_dict=False):
|
||||||
existed.soft_delete()
|
existed.soft_delete()
|
||||||
|
|
||||||
|
if current_app.config.get("USE_ACL"):
|
||||||
|
ACLManager().del_resource(name, ResourceTypeEnum.RELATION_VIEW)
|
||||||
|
|
||||||
return name
|
return name
|
||||||
|
|
Loading…
Reference in New Issue