You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation has a section where it discusses req.user._permissions but it's in the module and template section and not in the permissions section. I think it makes sense to include it in the permissions section so it's easier to find.
Proposed solution
after the section "Checking permissions in your own code" I would add this:
To check for permissions in templates with nunjucks, use data.user._permissions, an object, with boolean properties for permissions (e.g., admin: true or simply {} if there is no user).
The text was updated successfully, but these errors were encountered:
Expanding Permissions Documentation
The documentation has a section where it discusses req.user._permissions but it's in the module and template section and not in the permissions section. I think it makes sense to include it in the permissions section so it's easier to find.
Proposed solution
after the section "Checking permissions in your own code" I would add this:
To check for permissions in templates with nunjucks, use
data.user._permissions
, an object, with boolean properties for permissions (e.g., admin: true or simply {} if there is no user).The text was updated successfully, but these errors were encountered: