예제 #1
0
def push_system_user_to_assets(system_user_id, assets_id, username=None):
    system_user = SystemUser.objects.get(id=system_user_id)
    assets = get_objects(Asset, assets_id)
    task_name = _("Push system users to assets: {}").format(system_user.name)
    return push_system_user_util(system_user,
                                 assets,
                                 task_name,
                                 username=username)
예제 #2
0
def push_system_user_to_assets(system_user_id, asset_ids, username=None):
    """
    推送系统用户到指定的若干资产上
    """
    system_user = SystemUser.objects.get(id=system_user_id)
    assets = get_objects(Asset, asset_ids)
    task_name = gettext_noop(
        "Push system users to assets: ") + system_user.name

    return push_system_user_util(system_user,
                                 assets,
                                 task_name,
                                 username=username)