diff --git a/conf/config-sample.php b/conf/config-sample.php index 552efaf..80b99f3 100644 --- a/conf/config-sample.php +++ b/conf/config-sample.php @@ -91,3 +91,9 @@ $yourls_reserved_URL = [ /* ** Personal settings would go after here. */ + +define( 'LDAPAUTH_HOST', 'ldaps://ldap.127.0.0.1' ); // LDAP host name, IP or URL. You can use ldaps://host for LDAP with TLS +define( 'LDAPAUTH_PORT', '389' ); // LDAP server port - often 389 or 636 for TLS (LDAPS) +define( 'LDAPAUTH_BASE', 'ou=users,dc=yunohost,dc=org' ); // Base DN (location of users) +define( 'LDAPAUTH_USERNAME_FIELD', 'cn'); // (optional) LDAP field name in which username is store +define( 'LDAPAUTH_SEARCH_FILTER', '(&(|(objectclass=posixAccount))(uid={{username}})(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))' ); // Use %s as the place holder for the current user name diff --git a/conf/ldap.src b/conf/ldap.src new file mode 100644 index 0000000..404b12d --- /dev/null +++ b/conf/ldap.src @@ -0,0 +1,5 @@ +SOURCE_URL=https://github.com/k3a/yourls-ldap-plugin/archive/d60ea0e6aa9fba0de6aa4c2a8b38297e01822e34.zip +SOURCE_SUM=b5f6dba209c6b5a587ee5ec3f92cb445a97efa9796e7ea4a4b5316818ad1962d +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=zip +SOURCE_IN_SUBDIR=true diff --git a/scripts/install b/scripts/install index b7bd852..0c987bf 100644 --- a/scripts/install +++ b/scripts/install @@ -93,6 +93,9 @@ ynh_setup_source --dest_dir="$final_path" # Install French language ynh_setup_source --dest_dir="$final_path/user/languages" --source_id="fr" +# Install LDAP plugin +ynh_setup_source --dest_dir="$final_path/user/plugins" --source_id="ldap" + # copy index file cp ../conf/index.php $final_path/