From 963dae7041016ce3173d911782a0be558fcb988f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 13 Mar 2022 00:01:25 +0100 Subject: [PATCH] Fix --- conf/local.yaml | 10 +++++----- scripts/install | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/conf/local.yaml b/conf/local.yaml index 8617356..95d3fcf 100644 --- a/conf/local.yaml +++ b/conf/local.yaml @@ -112,12 +112,12 @@ kimai: attributes: # The following 2 rules are automatically prepended and can be overwritten. # Username is set to the value of the configured "usernameAttribute" field - - { ldap_attr: "uid", user_method: "setUsername" } + - { ldap_attr: "uid", user_method: setUsername } # Only applied if you don't configure a mapping for setEmail() - - { ldap_attr: "mail", user_method: "setEmail" } + - { ldap_attr: "mail", user_method: setEmail } # An example which will set the display name in Kimai from the # value of the "common name" field in your LDAP - - { ldap_attr: "cn", user_method: "setAlias" } + - { ldap_attr: "cn", user_method: setAlias } # You can comment the following section, if you don't want to manage # user roles in Kimai via LDAP groups. If you want to use the group @@ -135,8 +135,8 @@ kimai: # The following example rule will be expanded to (for user "foo"): # (&(&(objectClass=groupOfNames))(member=foo)) # default: empty - filter: "(&(|(objectclass=posixAccount))(uid={{username}})(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))" - + filter: "(&(objectClass=posixGroup)(cn=__APP__*))" + # The following field is taken from the LDAP user entry and its # value is used in the filter above as "valueOfUsernameAttribute". # The attribute must be given in lowercase! diff --git a/scripts/install b/scripts/install index 9ab86aa..5ffbe3d 100755 --- a/scripts/install +++ b/scripts/install @@ -30,7 +30,6 @@ is_public=$YNH_APP_ARG_IS_PUBLIC registration=$YNH_APP_ARG_REGISTRATION random_key=$(ynh_string_random 32) phpversion=$YNH_PHP_VERSION -email=$(ynh_user_get_info --username=$admin --key=mail) app=$YNH_APP_INSTANCE_NAME @@ -174,7 +173,6 @@ ynh_script_progression --message="Installing Kimai2..." pushd "$final_path" ynh_exec_as $app php$phpversion bin/console kimai:install -n - ynh_exec_as $app php$phpversion bin/console kimai:create-user $admin $email ROLE_SUPER_ADMIN -n popd #=================================================