2020-01-29 15:24:28 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Source app helpers
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
app=$1
|
|
|
|
added_users=$2
|
|
|
|
permission=$3
|
|
|
|
added_groups=$4
|
|
|
|
|
|
|
|
if [ "$app" == __APP__ ]; then
|
2020-02-11 09:59:59 +01:00
|
|
|
if [ "$permission" = "upload images" ]; then
|
|
|
|
if [ "$added_groups" = "visitors" ]; then
|
|
|
|
ynh_app_setting_delete --app=$app --key=protected_regex
|
2020-02-12 12:15:20 +01:00
|
|
|
ynh_app_setting_set --app=$app --key=is_public --value=1
|
2020-02-11 09:59:59 +01:00
|
|
|
|
|
|
|
yunohost app ssowatconf
|
|
|
|
else
|
|
|
|
ynh_print_warn --message="This app doesn't support this authorisation, you can only add or remove visitors group."
|
|
|
|
fi
|
2020-01-29 15:24:28 +01:00
|
|
|
fi
|
|
|
|
fi
|