mirror of
https://github.com/YunoHost-Apps/vikunja_ynh.git
synced 2024-09-03 18:06:26 +02:00
enable_registration
This commit is contained in:
parent
c3bb43b482
commit
5bb9bac4e5
4 changed files with 17 additions and 1 deletions
|
@ -20,7 +20,7 @@ service:
|
||||||
# Enable sharing of lists via a link
|
# Enable sharing of lists via a link
|
||||||
enablelinksharing: true
|
enablelinksharing: true
|
||||||
# Whether to let new users registering themselves or not
|
# Whether to let new users registering themselves or not
|
||||||
enableregistration: true
|
enableregistration: __ENABLE_REGISTRATION__
|
||||||
# Whether to enable task attachments or not
|
# Whether to enable task attachments or not
|
||||||
enabletaskattachments: true
|
enabletaskattachments: true
|
||||||
# The time zone all timestamps are in. Please note that time zones have to use [the official tz database names](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). UTC or GMT offsets won't work.
|
# The time zone all timestamps are in. Please note that time zones have to use [the official tz database names](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). UTC or GMT offsets won't work.
|
||||||
|
|
|
@ -13,3 +13,11 @@ services = ["__APP__"]
|
||||||
help = "Set the motd message, available from the /info endpoint"
|
help = "Set the motd message, available from the /info endpoint"
|
||||||
bind = "motd:/etc/vikunja/config.yml"
|
bind = "motd:/etc/vikunja/config.yml"
|
||||||
|
|
||||||
|
[main.config.enable_registration]
|
||||||
|
ask = "Enable registration"
|
||||||
|
type = "boolean"
|
||||||
|
yes = "true"
|
||||||
|
no = "false"
|
||||||
|
help = "Whether to let new users registering themselves or not"
|
||||||
|
bind = "enableregistration:/etc/vikunja/config.yml"
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ secret=$(ynh_string_random --length=32)
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
set_motd=""
|
set_motd=""
|
||||||
|
enable_registration="true"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||||
|
@ -51,6 +52,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
|
||||||
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=set_motd --value=$set_motd
|
ynh_app_setting_set --app=$app --key=set_motd --value=$set_motd
|
||||||
|
ynh_app_setting_set --app=$app --key=enable_registration --value=$enable_registration
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
|
|
@ -27,6 +27,7 @@ timezone="$(cat /etc/timezone)"
|
||||||
secret=$(ynh_string_random --length=32)
|
secret=$(ynh_string_random --length=32)
|
||||||
|
|
||||||
set_motd=$(ynh_app_setting_get --app=$app --key=set_motd)
|
set_motd=$(ynh_app_setting_get --app=$app --key=set_motd)
|
||||||
|
enable_registration=$(ynh_app_setting_get --app=$app --key=enable_registration)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
|
@ -44,6 +45,11 @@ if [ -z "$set_motd" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=set_motd --value=$set_motd
|
ynh_app_setting_set --app=$app --key=set_motd --value=$set_motd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$enable_registration" ]; then
|
||||||
|
enable_registration="true"
|
||||||
|
ynh_app_setting_set --app=$app --key=enable_registration --value=$enable_registration
|
||||||
|
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