mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
helpers 2.1: remove legacy ynh_legacy_permissions_exists and ynh_legacy_permissions_delete_all
This commit is contained in:
parent
84a7b23e8a
commit
88684c7937
1 changed files with 0 additions and 38 deletions
|
@ -358,41 +358,3 @@ ynh_permission_has_user() {
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if a legacy permissions exist
|
|
||||||
#
|
|
||||||
# [packagingv1]
|
|
||||||
#
|
|
||||||
# usage: ynh_legacy_permissions_exists
|
|
||||||
# | exit: Return 1 if the permission doesn't exist, 0 otherwise
|
|
||||||
#
|
|
||||||
# Requires YunoHost version 4.1.2 or higher.
|
|
||||||
ynh_legacy_permissions_exists() {
|
|
||||||
for permission in "skipped" "unprotected" "protected"; do
|
|
||||||
if ynh_permission_exists --permission="legacy_${permission}_uris"; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove all legacy permissions
|
|
||||||
#
|
|
||||||
# [packagingv1]
|
|
||||||
#
|
|
||||||
# usage: ynh_legacy_permissions_delete_all
|
|
||||||
#
|
|
||||||
# example:
|
|
||||||
# if ynh_legacy_permissions_exists
|
|
||||||
# then
|
|
||||||
# ynh_legacy_permissions_delete_all
|
|
||||||
# # You can recreate the required permissions here with ynh_permission_create
|
|
||||||
# fi
|
|
||||||
# Requires YunoHost version 4.1.2 or higher.
|
|
||||||
ynh_legacy_permissions_delete_all() {
|
|
||||||
for permission in "skipped" "unprotected" "protected"; do
|
|
||||||
if ynh_permission_exists --permission="legacy_${permission}_uris"; then
|
|
||||||
ynh_permission_delete --permission="legacy_${permission}_uris"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue