mirror of
https://github.com/YunoHost-Apps/mediawiki_ynh.git
synced 2024-09-03 19:46:05 +02:00
create account
This commit is contained in:
parent
cbf32f417d
commit
d7ecb4bbc2
4 changed files with 23 additions and 0 deletions
|
@ -181,3 +181,5 @@ $LDAPProviderDomainConfigProvider = function() {
|
||||||
|
|
||||||
return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );
|
return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$wgGroupPermissions['*']['createaccount'] = __CREATE_ACCOUNT__;
|
||||||
|
|
|
@ -3,6 +3,18 @@ version = "1.0"
|
||||||
[main]
|
[main]
|
||||||
name = "Mediawiki configuration"
|
name = "Mediawiki configuration"
|
||||||
|
|
||||||
|
|
||||||
|
[main.config]
|
||||||
|
name = "Configuration Options"
|
||||||
|
|
||||||
|
[main.config.create_account]
|
||||||
|
ask = "Create account"
|
||||||
|
type = "boolean"
|
||||||
|
yes = true
|
||||||
|
no = false
|
||||||
|
help = "Set to 'true' to allow account creation."
|
||||||
|
bind = "create_account:__FINALPATH__/LocalSettings.php"
|
||||||
|
|
||||||
[main.php_fpm_config]
|
[main.php_fpm_config]
|
||||||
name = "PHP-FPM configuration"
|
name = "PHP-FPM configuration"
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,10 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
secret=$(ynh_string_random --length=64)
|
secret=$(ynh_string_random --length=64)
|
||||||
|
create_account=false
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=secret --value=$secret
|
ynh_app_setting_set --app=$app --key=secret --value=$secret
|
||||||
|
ynh_app_setting_set --app=$app --key=create_account --value=$create_account
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
|
|
@ -34,6 +34,12 @@ if [ -z "${fpm_usage:-}" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If create_account doesn't exist, create it
|
||||||
|
if [ -z "$create_account" ]; then
|
||||||
|
create_account=false
|
||||||
|
ynh_app_setting_set --app=$app --key=create_account --value=$create_account
|
||||||
|
fi
|
||||||
|
|
||||||
# Removed in dec. 2020
|
# Removed in dec. 2020
|
||||||
ldap_user=$(ynh_app_setting_get --app=$app --key=ldap_user)
|
ldap_user=$(ynh_app_setting_get --app=$app --key=ldap_user)
|
||||||
if [[ -n "${ldap_user:-}" ]]; then
|
if [[ -n "${ldap_user:-}" ]]; then
|
||||||
|
|
Loading…
Reference in a new issue