Beispiel #1
0
def _create_auth_file(callee, users=None):
    if users is None:
        users = userdb.load_users()

    contactgroups = load_contact_group_information()
    groups = {}
    for gid, group in contactgroups.items():
        if 'nagvis_maps' in group and group['nagvis_maps']:
            groups[gid] = group['nagvis_maps']

    _create_php_file(callee, users, config.get_role_permissions(), groups)
Beispiel #2
0
def create_auth_file(callee, users=None):
    from cmk.gui.watolib.groups import load_contact_group_information
    import cmk.gui.userdb as userdb  # TODO: Cleanup
    if users is None:
        users = userdb.load_users()

    store.mkdir(g_auth_base_dir)

    contactgroups = load_contact_group_information()
    groups = {}
    for gid, group in contactgroups.items():
        if 'nagvis_maps' in group and group['nagvis_maps']:
            groups[gid] = group['nagvis_maps']

    create_php_file(callee, users, config.get_role_permissions(), groups)