mirror of
https://github.com/YunoHost-Apps/bozon_ynh.git
synced 2024-09-03 18:16:09 +02:00
allowed users #6
This commit is contained in:
parent
f5087449d8
commit
e728a5c19c
2 changed files with 3 additions and 24 deletions
|
@ -37,15 +37,6 @@
|
|||
"example": "/bozon",
|
||||
"default": "/bozon"
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user",
|
||||
"ask": {
|
||||
"en": "Choose an admin user for BoZoN",
|
||||
"fr": "Choisissez un administrateur pour BoZoN"
|
||||
},
|
||||
"example": "homer"
|
||||
},
|
||||
{
|
||||
"name": "public_site",
|
||||
"ask": {
|
||||
|
|
|
@ -6,10 +6,9 @@ set -e
|
|||
# retrieve arguments
|
||||
domain=$1
|
||||
path=$2
|
||||
admin=$3
|
||||
is_public=$4
|
||||
default_lang=$5
|
||||
filesize=$6
|
||||
is_public=$3
|
||||
default_lang=$4
|
||||
filesize=$5
|
||||
|
||||
# definie useful vars
|
||||
app=bozon
|
||||
|
@ -26,15 +25,7 @@ if [[ ! $? -eq 0 ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# check user
|
||||
sudo yunohost user list --json | grep -q "\"username\": \"$admin\""
|
||||
if [[ ! $? -eq 0 ]]; then
|
||||
echo "Wrong user"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# save app settings
|
||||
sudo yunohost app setting $app admin -v "$admin"
|
||||
sudo yunohost app setting $app is_public -v "$is_public"
|
||||
sudo yunohost app setting $app domain -v "$domain"
|
||||
sudo yunohost app setting $app path -v "$path"
|
||||
|
@ -92,9 +83,6 @@ else
|
|||
sudo yunohost app setting $app unprotected_uris -v "/"
|
||||
fi
|
||||
|
||||
# adding admin to the allowed users
|
||||
sudo yunohost app addaccess $app -u $admin
|
||||
|
||||
# restart services
|
||||
sudo service nginx reload
|
||||
sudo yunohost app ssowatconf
|
||||
|
|
Loading…
Reference in a new issue