Restrict a backend function

Code must be added whenever a new restriction is needed:

  1. Check lib/settings/utils.py:get_permissions_suggestions to determine if the module you’re adding a restriction to is already imported into the modules list
  2. Decorate your function with lib/core/decorators.py:requires_permission, for example @requires_permission(‘agent/claims/submitClaim’, ‘rw’)
    • Follow a URL-like pattern, for example agent/claims/submitClaim
  3. Once the code is in place, build the rule as you would when restricting a module or page