mirror of
https://github.com/YunoHost-Apps/element_ynh.git
synced 2024-09-03 18:36:08 +02:00
Merge pull request #78 from YunoHost-Apps/disable-signup-button
Update config.json
This commit is contained in:
commit
906b278ead
4 changed files with 28 additions and 1 deletions
|
@ -15,6 +15,8 @@
|
||||||
"enable_presence_by_hs_url": {
|
"enable_presence_by_hs_url": {
|
||||||
"https://matrix.org": false,
|
"https://matrix.org": false,
|
||||||
"https://matrix-client.matrix.org": false
|
"https://matrix-client.matrix.org": false
|
||||||
|
},
|
||||||
|
"embedded_pages": {
|
||||||
|
"login_for_welcome": __LOGIN_FOR_WELCOME__
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
config_panel.toml
Normal file
15
config_panel.toml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
version = "1.0"
|
||||||
|
|
||||||
|
[main]
|
||||||
|
name = "Element configuration"
|
||||||
|
|
||||||
|
[main.config]
|
||||||
|
name = "Configuration Options"
|
||||||
|
|
||||||
|
[main.config.login_for_welcome]
|
||||||
|
ask = "Display login as welcome page"
|
||||||
|
type = "boolean"
|
||||||
|
yes = true
|
||||||
|
no = false
|
||||||
|
help = "When true, the app will use the login form as a welcome page instead of the welcome page itself. This disables use of welcome_url and all welcome page functionality."
|
||||||
|
bind = "login_for_welcome:/var/www/__APP__/config.json"
|
|
@ -28,6 +28,8 @@ default_home_server=$YNH_APP_ARG_DEFAULT_HOME_SERVER
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
login_for_welcome=true
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -47,6 +49,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=default_home_server --value=$default_home_server
|
ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server
|
||||||
|
ynh_app_setting_set --app=$app --key=login_for_welcome --value=$login_for_welcome
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
|
|
|
@ -21,6 +21,8 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server)
|
default_home_server=$(ynh_app_setting_get --app=$app --key=default_home_server)
|
||||||
|
|
||||||
|
login_for_welcome=$(ynh_app_setting_get --app=$app --key=login_for_welcome)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -52,6 +54,11 @@ if [ -z "$default_home_server" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server
|
ynh_app_setting_set --app=$app --key=default_home_server --value=$default_home_server
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$login_for_welcome" ]; then
|
||||||
|
login_for_welcome=true
|
||||||
|
ynh_app_setting_set --app=$app --key=login_for_welcome --value=$login_for_welcome
|
||||||
|
fi
|
||||||
|
|
||||||
# Cleaning legacy permissions
|
# Cleaning legacy permissions
|
||||||
if ynh_legacy_permissions_exists; then
|
if ynh_legacy_permissions_exists; then
|
||||||
ynh_legacy_permissions_delete_all
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
Loading…
Add table
Reference in a new issue