gerd.nextcloud: ldap promote admin group
This commit is contained in:
parent
239cb6f9b2
commit
492236862c
1 changed files with 6 additions and 3 deletions
|
@ -36,8 +36,8 @@ let
|
||||||
# EDIT: nextcloud_users group, contains the users who can login to Nextcloud
|
# EDIT: nextcloud_users group, contains the users who can login to Nextcloud
|
||||||
ldapUserFilter = "(&(objectclass=person)${config.mine.shared.settings.ldap.user_filter})";
|
ldapUserFilter = "(&(objectclass=person)${config.mine.shared.settings.ldap.user_filter})";
|
||||||
ldapUserFilterObjectclass = "person";
|
ldapUserFilterObjectclass = "person";
|
||||||
ldapGroupFilter = "(&(objectclass=groupOfUniqueNames)(cn=${config.mine.shared.settings.ldap.groups.member}))";
|
ldapGroupFilter = "(&(objectclass=groupOfUniqueNames)(|(cn=${config.mine.shared.settings.ldap.groups.admin})(cn=${config.mine.shared.settings.ldap.groups.member})))";
|
||||||
ldapGroupFilterGroups = config.mine.shared.settings.ldap.groups.member;
|
ldapGroupFilterGroups = "admin;user";
|
||||||
ldapGroupFilterObjectclass = "groupOfUniqueNames";
|
ldapGroupFilterObjectclass = "groupOfUniqueNames";
|
||||||
ldapGroupMemberAssocAttr = "uniqueMember";
|
ldapGroupMemberAssocAttr = "uniqueMember";
|
||||||
ldapEmailAttribute = config.mine.shared.settings.ldap.attr.email;
|
ldapEmailAttribute = config.mine.shared.settings.ldap.attr.email;
|
||||||
|
@ -59,10 +59,13 @@ let
|
||||||
# create new empty config
|
# create new empty config
|
||||||
${occ} ldap:create-empty-config
|
${occ} ldap:create-empty-config
|
||||||
|
|
||||||
# setup password
|
# setup ldap password
|
||||||
BIND_USERPASS="$(cat $CREDENTIALS_DIRECTORY/lldap-bind-user-pass)"
|
BIND_USERPASS="$(cat $CREDENTIALS_DIRECTORY/lldap-bind-user-pass)"
|
||||||
${occ} ldap:set-config s01 ldapAgentPassword "$BIND_USERPASS"
|
${occ} ldap:set-config s01 ldapAgentPassword "$BIND_USERPASS"
|
||||||
|
|
||||||
|
# promote ldap admin group to admins
|
||||||
|
${occ} ldap:promote-group ${config.mine.shared.settings.ldap.groups.admin} || true
|
||||||
|
|
||||||
# set settings
|
# set settings
|
||||||
${builtins.concatStringsSep "\n" ldap_commands}
|
${builtins.concatStringsSep "\n" ldap_commands}
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue