mirror of
https://github.com/YunoHost-Apps/ztncui_ynh.git
synced 2024-09-03 18:06:05 +02:00
[enh] use permissions system
This commit is contained in:
parent
772480a9af
commit
600ccede11
3 changed files with 4 additions and 14 deletions
|
@ -14,7 +14,7 @@
|
|||
"email": "tituspijean@outlook.com"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.5"
|
||||
"yunohost": ">= 3.7"
|
||||
},
|
||||
"services": [],
|
||||
"multi_instance": false,
|
||||
|
@ -31,7 +31,7 @@
|
|||
"en": "REMINDER: ztncui needs the ZeroTier app to be already installed.",
|
||||
"fr": "RAPPEL: ztncui nécessite que l'app ZeroTier soit déjà installée."
|
||||
},
|
||||
"example": "example.com"
|
||||
"example": "zt.example.com"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
|
|
|
@ -280,13 +280,12 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
|
|||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring SSOwat..." --time --weight=1
|
||||
ynh_script_progression --message="Configuring SSOwat..."
|
||||
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
||||
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
|
||||
ynh_permission_update --permission "main" --add visitors
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -39,15 +39,6 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1
|
||||
|
||||
# Fix is_public as a boolean value
|
||||
if [ "$is_public" = "Yes" ]; then
|
||||
ynh_app_setting_set --app=$app --key=is_public --value=1
|
||||
is_public=1
|
||||
elif [ "$is_public" = "No" ]; then
|
||||
ynh_app_setting_set --app=$app --key=is_public --value=0
|
||||
is_public=0
|
||||
fi
|
||||
|
||||
# If db_name doesn't exist, create it
|
||||
if [ -z "$db_name" ]; then
|
||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
|
|
Loading…
Add table
Reference in a new issue