mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix parameters
This commit is contained in:
parent
c826a37aaa
commit
cbc1c82df7
1 changed files with 6 additions and 8 deletions
|
@ -271,20 +271,18 @@ ynh_permission_create() {
|
||||||
url="None"
|
url="None"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${allowed:-} ]]; then
|
|
||||||
allowed=",allowed=['${allowed//';'/"','"}']"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if permission already exists
|
# Check if permission already exists
|
||||||
if ynh_permission_exists --permission $permission; then
|
if ynh_permission_exists --permission $permission; then
|
||||||
# If permission exits, update it
|
# If permission exits, update it
|
||||||
local add
|
if [[ -n ${allowed:-} ]]; then
|
||||||
if [[ -n ${add:-} ]]; then
|
allowed="--add ${allowed//';'/" "}"
|
||||||
add="--add ${allowed//';'/" "}"
|
|
||||||
fi
|
fi
|
||||||
ynh_exec_warn_less ynh_permission_update --permission $permission ${add:-}
|
ynh_exec_warn_less ynh_permission_update --permission $permission ${allowed:-}
|
||||||
else
|
else
|
||||||
# If not, create it
|
# If not, create it
|
||||||
|
if [[ -n ${allowed:-} ]]; then
|
||||||
|
allowed=",allowed=['${allowed//';'/"','"}']"
|
||||||
|
fi
|
||||||
yunohost tools shell -c "from yunohost.permission import permission_create; permission_create('$app.$permission', url=$url ${allowed:-} , sync_perm=False)"
|
yunohost tools shell -c "from yunohost.permission import permission_create; permission_create('$app.$permission', url=$url ${allowed:-} , sync_perm=False)"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue