def push_system_user_to_assets(system_user, assets, username=None): task_name = _("Push system users to assets: {}").format(system_user.name) system_user = get_object_if_need(SystemUser, system_user) assets = get_objects_if_need(Asset, assets) return push_system_user_util(system_user, assets, task_name, username=username)
def push_system_user_to_assets_manual(system_user, username=None): system_user = get_object_if_need(SystemUser, system_user) assets = system_user.get_related_assets() task_name = _("Push system users to assets: {}").format(system_user.name) return push_system_user_util(system_user, assets, task_name=task_name, username=username)
def push_system_user_to_assets_manual(system_user, username=None): """ 将系统用户推送到与它关联的所有资产上 """ system_user = get_object_if_need(SystemUser, system_user) assets = system_user.get_related_assets() task_name = gettext_noop( "Push system users to assets: ") + system_user.name return push_system_user_util(system_user, assets, task_name=task_name, username=username)