mirror of
https://github.com/YunoHost/test_apps.git
synced 2024-09-03 20:06:29 +02:00
- Add more test of helper 'ynh_permission_update' - Add test of permission protection feature
22 lines
628 B
Bash
22 lines
628 B
Bash
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
|
|
# Source YunoHost helpers
|
|
source /usr/share/yunohost/helpers
|
|
|
|
# Stop script if errors
|
|
ynh_abort_if_errors
|
|
|
|
# Retrieve arguments
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
admin_user=$(ynh_app_setting_get --app $app --key admin_user)
|
|
|
|
#=================================================
|
|
# UPDATE PERMISSIONS
|
|
#=================================================
|
|
|
|
ynh_permission_update --permission admin --remove $admin_user --protected false
|
|
ynh_permission_update --permission dev --add $admin_user --protected true
|