Updating documentation following changes in the PRs

This commit is contained in:
Alexandre Aubin 2019-10-09 23:31:50 +02:00
parent 6a9746c32d
commit 1376de666b

View file

@ -129,17 +129,17 @@ $ yunohost user permission update mail --remove all_users --add bob
### Notes for apps packagers ### Notes for apps packagers
By default, installing an app creates the permission `$app.main` with `all_users` allowed by default. By default, installing an app creates the permission `$app.main` with `all_users` allowed by default.
If you want to create a custom permission for your app (e.g. to restrict access to an admin interface) you may use the following helpers:
If you wish to make the application publicly available, instead of the old `unprotected_urls` mechanism, you should give access to the special groups `visitors`:
```bash ```bash
ynh_permission_create --permission "admin" --urls "$domain$path_url/admin" ynh_permission_update --permission "main" --remove "all_users" --add "visitors"
ynh_permission_update --permission "admin" --add "$admin_user"
``` ```
For now, inside the `change_url` script, you need to take care of updating the url corresponding to your permission: If you wish to create a custom permission for your app (e.g. to restrict access to an admin interface) you may use the following helpers:
```bash ```bash
ynh_permission_urls --permission "admin" --remove "$old_domain$old_path_url/admin" --add "$domain$path_url/admin" ynh_permission_create --permission "admin" --url "/admin" --allowed "$admin_user"
``` ```
However, you don't need to take care of removing permissions or backing up/restoring them as it is handled by the core of YunoHost. You don't need to take care of removing permissions or backing up/restoring them as it is handled by the core of YunoHost.