mirror of https://github.com/jumpserver/jumpserver
fix: 创建授权/添加资产到节点;不再自动更新资产的管理用户
parent
28a6024b49
commit
141dafc8bf
|
@ -37,8 +37,10 @@ def on_authbook_post_delete(sender, instance, **kwargs):
|
|||
def on_authbook_post_create(sender, instance, created, **kwargs):
|
||||
instance.sync_to_system_user_account()
|
||||
if created:
|
||||
pass
|
||||
# # 不再自动更新资产管理用户,只允许用户手动指定。
|
||||
# 只在创建时进行更新资产的管理用户
|
||||
instance.update_asset_admin_user_if_need()
|
||||
# instance.update_asset_admin_user_if_need()
|
||||
|
||||
|
||||
@receiver(pre_save, sender=AuthBook)
|
||||
|
|
|
@ -23,5 +23,6 @@ def add_nodes_assets_to_system_users(nodes_keys, system_users):
|
|||
instance, created = AuthBook.objects.update_or_create(
|
||||
defaults=defaults, asset=asset, systemuser=system_user
|
||||
)
|
||||
# # 不再自动更新资产管理用户,只允许用户手动指定。
|
||||
# 只要关联都需要更新资产的管理用户
|
||||
instance.update_asset_admin_user_if_need()
|
||||
# instance.update_asset_admin_user_if_need()
|
||||
|
|
Loading…
Reference in New Issue