Permissions vs. Visibility¶
In Toucan, you have two ways of controlling access to content: you can apply permissions at data level, or visibility at design level.
What is a permission ?¶
A permission is a security filter applied to data to make sure all users have only access to data they need, and no more.
In technical terms, it is a query mask that is applied at the backend level to every data query of the application. So for every query run in the application, a permission will first apply an additional filter to restrain the output result. In data systems this type of feature is usually called “row-level security” (RLS).
A permission depends on user attributes, in most cases on user groups. It expresses access rights like “User group ‘France’ can only access ‘France’ data”. In the majority of cases, you will want to use permissions to filter your views selector data, as it is the cornerstone of your application. For example a user in user group ‘France’ can only see “France” and cities in France in the view selector.
Permissions are always applied in production, independently of the user role (be it admin, app builder, validator or viewer), but are only applied for validators in the studio (staging mode).
What is visibility ?¶
Visibility is just a design rule to display or not a tile, chapter, subchapter or story.
It expresses rules like “The view ‘France’ should display the story ‘Country overview’”.
Keep in mind it does not impose any constraint on data, it only controls the display of front-end elements.
Visibility is always applied in production, independently of the user role (be it admin, app builder, validator or viewer), but is only applied for validators in the studio (staging mode).
Summary: Permission vs. Visibility¶
Here is a summary table of the key differences between permissions and custom visibility:
Permission | Visibility | |
---|---|---|
Basic use case: | “User group X should only access to X data” | “View X should display story Y” |
Filter applied on: | Data | Design |
Filter applied at: | Back-end level | Front-end level |
In production mode, applies to: | Every role (admin, conceptor, validator and viewer) | Every role (admin, conceptor, validator and viewer) |
In staging mode, applies to: | Validator role | Validator role |