Language-based permissions
Policies of the content module can be limited to languages, so that a translator may, for example, add and edit French translations and nothing else. The limitation is called Language and is chosen in the role editor (Users > Roles and policies) like the other limitations.
The functions with a Language limitation
| Function | The limitation controls |
|---|---|
| content/create | In which languages new objects may be created |
| content/edit | Which translations may be edited, and which translations may be added to existing objects |
| content/publish | In which languages drafts may be published |
| content/translate | In which languages objects may be translated |
| content/hide | Hiding and revealing, limited by the languages of the object |
content/read has no Language limitation: what a user can read in which language is decided by the siteaccess's SiteLanguageList[], not by a policy. The limitations every function supports are listed in the policies of the content module.
Example: a translator into French
A role for the group of French translators with these policies:
| Policy | Limitations |
|---|---|
| content/read | none (or the sections they work in) |
| content/edit | Language: French |
| content/publish | Language: French |
The translators can open every object, add a French translation to it, and edit and publish French translations, but cannot change the text in any other language. Add content/create with Language French and Class Article, limited to a subtree, and they can also write new French articles there.
A policy with several limitations allows what all of them allow together: content/create with Class Article, Subtree /News and Language French allows French articles below /News only.
Things to know
- The languages offered in the limitation are the content languages of Setup > Languages. A language added later must be added to the policy as well.
- The language selection page shown before editing (content/edit_languages.tpl) offers only the languages the user may edit or add (can_edit_languages and can_create_languages of the object).
More
- Policy functions: how views, functions and limitations work.
- Roles, policies and unactivated users.
- Content languages, section 7.
Contributors
- Geir Arne Waaler Maintainer
- Andrea Melo Maintainer
- Graham Brookins Updated Maintainer
Comments
Add a comment