National-Forestry-Authority / forests

3 stars 1 forks source link

Manager role should be able to add/edit media fields on plans #145

Open pcambra opened 2 years ago

pcambra commented 2 years ago

We would need to add in the report, any log, images taken during the field work.

Who can add these images? Anybody who is involved in the workflow fro #86

mstenta commented 2 years ago

FYI if you are using the "Manager" role provided by farm_role_roles module, then that is a "managed" role, meaning the permissions are managed by the farm_role module automatically.

You can add a simple YML config file to a custom module to grant permission(s) to managed roles. Docs here: https://docs.farmos.org/development/module/roles/#providing-permissions-for-managed-roles

Example:

my_module.managed_role_permissions.yml

my_module:
  config_permissions:
    - the permission string

The config_permission block specifically adds permissions ONLY to the Manager role, but not to the Worker or Viewer roles.