mirror of
https://github.com/YunoHost-Apps/yourls_ynh.git
synced 2024-09-03 20:35:59 +02:00
Fix
This commit is contained in:
parent
4ac3b8e631
commit
48ad2f37c6
2 changed files with 25 additions and 0 deletions
|
@ -54,6 +54,11 @@
|
||||||
{
|
{
|
||||||
"name": "password",
|
"name": "password",
|
||||||
"type": "password"
|
"type": "password"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "is_public",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ ynh_abort_if_errors
|
||||||
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
|
||||||
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
password=$YNH_APP_ARG_PASSWORD
|
password=$YNH_APP_ARG_PASSWORD
|
||||||
random=$(ynh_string_random --length=24)
|
random=$(ynh_string_random --length=24)
|
||||||
|
|
||||||
|
@ -133,6 +134,25 @@ ynh_permission_update --permission="main" --add="visitors"
|
||||||
ynh_script_progression --message="Finalizing installation..." --weight=1
|
ynh_script_progression --message="Finalizing installation..." --weight=1
|
||||||
ynh_local_curl "admin/install.php" "install=dummy"
|
ynh_local_curl "admin/install.php" "install=dummy"
|
||||||
|
|
||||||
|
# Remove the public access
|
||||||
|
ynh_permission_update --permission="main" --remove="visitors"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SETUP SSOWAT
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring permissions..." --time --weight=1
|
||||||
|
|
||||||
|
# Make app public if necessary
|
||||||
|
if [ $is_public -eq 1 ]
|
||||||
|
then
|
||||||
|
# Everyone can access the app.
|
||||||
|
# The "main" permission is automatically created before the install script.
|
||||||
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Only the admin can access the admin panel of the app (if the app has an admin panel)
|
||||||
|
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue