mirror of
https://github.com/YunoHost-Apps/mediawiki_ynh.git
synced 2024-09-03 19:46:05 +02:00
Merge pull request #13 from decentral1se/login-fixups-ldap-password
Fixups to allow LDAP and username/password auth to co-exist
This commit is contained in:
commit
f793ed9c14
3 changed files with 6 additions and 4 deletions
|
@ -137,6 +137,9 @@ wfLoadExtension( 'LDAPProvider' );
|
||||||
# https://www.mediawiki.org/wiki/Extension:PluggableAuth
|
# https://www.mediawiki.org/wiki/Extension:PluggableAuth
|
||||||
wfLoadExtension( 'PluggableAuth' );
|
wfLoadExtension( 'PluggableAuth' );
|
||||||
|
|
||||||
|
$wgPluggableAuth_EnableLocalLogin = true;
|
||||||
|
$wgPluggableAuth_EnableLocalProperties = true;
|
||||||
|
|
||||||
# LDAPAuthentication2
|
# LDAPAuthentication2
|
||||||
# https://www.mediawiki.org/wiki/Extension:LDAPAuthentication2
|
# https://www.mediawiki.org/wiki/Extension:LDAPAuthentication2
|
||||||
wfLoadExtension( 'LDAPAuthentication2' );
|
wfLoadExtension( 'LDAPAuthentication2' );
|
||||||
|
|
|
@ -18,6 +18,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
|
admin_password=$YNH_APP_ARG_PASSWORD
|
||||||
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
|
password=$YNH_APP_ARG_PASSWORD
|
||||||
|
@ -50,6 +51,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
|
||||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||||
|
ynh_app_setting_set --app=$app --key=admin_password --value=$admin_password
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
||||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||||
ynh_app_setting_set --app=$app --key=wiki_name --value=$wiki_name
|
ynh_app_setting_set --app=$app --key=wiki_name --value=$wiki_name
|
||||||
|
@ -148,7 +150,7 @@ php $final_path/maintenance/install.php --conf $final_path \
|
||||||
--dbname $db_name \
|
--dbname $db_name \
|
||||||
--dbprefix "mdk_" \
|
--dbprefix "mdk_" \
|
||||||
--lang $language \
|
--lang $language \
|
||||||
--pass $password \
|
--pass $admin_password \
|
||||||
$wiki_name $admin
|
$wiki_name $admin
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -158,7 +160,6 @@ cp ../conf/LocalSettings.php $final_path/LocalSettings.php
|
||||||
|
|
||||||
ynh_replace_string --match_string="__WIKI_NAME__" --replace_string="$wiki_name" --target_file="$final_path/LocalSettings.php"
|
ynh_replace_string --match_string="__WIKI_NAME__" --replace_string="$wiki_name" --target_file="$final_path/LocalSettings.php"
|
||||||
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/LocalSettings.php"
|
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$final_path/LocalSettings.php"
|
||||||
ynh_replace_string --match_string="__PASSWORD__" --replace_string="$password" --target_file="$final_path/LocalSettings.php"
|
|
||||||
|
|
||||||
if [ $path_url = "/" ]; then
|
if [ $path_url = "/" ]; then
|
||||||
# MediaWiki expects a "" for the root URL which is typically assumed to be
|
# MediaWiki expects a "" for the root URL which is typically assumed to be
|
||||||
|
|
|
@ -15,7 +15,6 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
domain=$(ynh_app_setting_get $app domain)
|
domain=$(ynh_app_setting_get $app domain)
|
||||||
path_url=$(ynh_app_setting_get $app path)
|
path_url=$(ynh_app_setting_get $app path)
|
||||||
admin=$(ynh_app_setting_get $app admin)
|
admin=$(ynh_app_setting_get $app admin)
|
||||||
password=$(ynh_app_setting_get $app password)
|
|
||||||
is_public=$(ynh_app_setting_get $app is_public)
|
is_public=$(ynh_app_setting_get $app is_public)
|
||||||
final_path=$(ynh_app_setting_get $app final_path)
|
final_path=$(ynh_app_setting_get $app final_path)
|
||||||
language=$(ynh_app_setting_get $app language)
|
language=$(ynh_app_setting_get $app language)
|
||||||
|
@ -130,7 +129,6 @@ cp ../conf/LocalSettings.php $final_path/LocalSettings.php
|
||||||
ynh_replace_string "__WIKI_NAME__" "YunoWiki" "$final_path/LocalSettings.php"
|
ynh_replace_string "__WIKI_NAME__" "YunoWiki" "$final_path/LocalSettings.php"
|
||||||
|
|
||||||
ynh_replace_string "__ADMIN__" "$admin" "$final_path/LocalSettings.php"
|
ynh_replace_string "__ADMIN__" "$admin" "$final_path/LocalSettings.php"
|
||||||
ynh_replace_string "__PASSWORD__" "$password" "$final_path/LocalSettings.php"
|
|
||||||
|
|
||||||
if [ $path_url = "/" ]; then
|
if [ $path_url = "/" ]; then
|
||||||
# MediaWiki expects a "" for the root URL which is typically assumed to be
|
# MediaWiki expects a "" for the root URL which is typically assumed to be
|
||||||
|
|
Loading…
Reference in a new issue