mirror of
https://github.com/YunoHost-Apps/mobilizon_ynh.git
synced 2024-09-03 19:46:19 +02:00
Fix ldap config + remove the need to define a password since authentication uses LDAP
This commit is contained in:
parent
7611c86cdd
commit
b17c8fd862
3 changed files with 13 additions and 13 deletions
|
@ -1,11 +1,16 @@
|
||||||
|
|
||||||
config :mobilizon, Mobilizon.Service.Auth.Authenticator, Mobilizon.Service.Auth.LDAPAuthenticator
|
config :mobilizon, Mobilizon.Service.Auth.Authenticator, Mobilizon.Service.Auth.LDAPAuthenticator
|
||||||
config :mobilizon, :ldap,
|
config :mobilizon, :ldap,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
host: "localhost",
|
host: "127.0.0.1",
|
||||||
port: 389,
|
port: 389,
|
||||||
ssl: false,
|
ssl: false,
|
||||||
# sslopts: [],
|
# sslopts: [],
|
||||||
tls: false,
|
tls: false,
|
||||||
# tlsopts: [],
|
# tlsopts: [],
|
||||||
base: "ou=users,dc=yunohost,dc=org",
|
base: "ou=users,dc=yunohost,dc=org",
|
||||||
uid: "uid"
|
uid: "uid",
|
||||||
|
require_bind_for_search: false,
|
||||||
|
bind_uid: nil,
|
||||||
|
bind_password: nil
|
||||||
|
|
||||||
|
|
|
@ -57,16 +57,7 @@
|
||||||
"fr": "Choisissez l'administrateur"
|
"fr": "Choisissez l'administrateur"
|
||||||
},
|
},
|
||||||
"example": "johndoe"
|
"example": "johndoe"
|
||||||
},
|
}
|
||||||
{
|
|
||||||
"name": "password",
|
|
||||||
"type": "password",
|
|
||||||
"ask": {
|
|
||||||
"en": "Set the administrator password",
|
|
||||||
"fr": "Définissez le mot de passe administrateur"
|
|
||||||
},
|
|
||||||
"example": "Choose a password"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,6 @@ path_url="/"
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
language=$YNH_APP_ARG_LANGUAGE
|
language=$YNH_APP_ARG_LANGUAGE
|
||||||
password=$YNH_APP_ARG_PASSWORD
|
|
||||||
|
|
||||||
admin_email=$(ynh_user_get_info $admin 'mail')
|
admin_email=$(ynh_user_get_info $admin 'mail')
|
||||||
|
|
||||||
|
@ -161,8 +160,13 @@ cat "../conf/ldap.exs" >> "$config"
|
||||||
|
|
||||||
pushd $final_path/$app
|
pushd $final_path/$app
|
||||||
chmod o-rwx $config
|
chmod o-rwx $config
|
||||||
|
# Compile *again* because we added ldap conf in between... dunno if the first is relevant
|
||||||
|
sudo -u "$app" MIX_ENV=prod mix compile
|
||||||
ynh_secure_remove --file="/tmp/setup_db.psql"
|
ynh_secure_remove --file="/tmp/setup_db.psql"
|
||||||
sudo -u "$app" MIX_ENV=prod mix ecto.migrate
|
sudo -u "$app" MIX_ENV=prod mix ecto.migrate
|
||||||
|
|
||||||
|
# We generate a dummy password ... this will actually *not* be used because the admin is supposed to connect via the ldap
|
||||||
|
password=$(ynh_string_random --length=30)
|
||||||
sudo -u "$app" MIX_ENV=prod mix mobilizon.users.new "$admin_email" --admin --password "$password"
|
sudo -u "$app" MIX_ENV=prod mix mobilizon.users.new "$admin_email" --admin --password "$password"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue