Very crude permissions

TODO: Use Symfony Voters
This commit is contained in:
2024-10-30 13:03:29 +01:00
parent c20ec66f22
commit b41e394e9c
3 changed files with 64 additions and 3 deletions

View File

@@ -32,13 +32,46 @@
Administrator
{% elseif 'ROLE_REVISOR' in app.user.roles %}
Revisor
{% elseif 'ROLE_EDITOR' in app.user.roles %}
Editor
{% else %}
Reader
{% endif %}
<span class="icon is-small is-size-5 pl-3 has-text-link">
<i class="fa fa-question-circle"></i>
</span>
</p>
<article class="message is-info">
<div class="message-header">
<p>
<span class="icon is-small is-size-5 mr-3">
<i class="fa fa-info-circle"></i>
</span>
Role permissions
</p>
</div>
<div class="message-body">
{% if 'ROLE_ADMIN' in app.user.roles %}
<p>
Administrators can create and edit users of the ArCOA data entry system,
including changing passwords and user roles, and disabling accounts.
</p>
<p>
They can perform all actions on all records and vocabularies
(create, view, edit, delete).
</p>
{% elseif 'ROLE_REVISOR' in app.user.roles %}
<p>Revisors can perform all actions (create, view, edit, delete) on all records and vocabs.</p>
{% elseif 'ROLE_EDITOR' in app.user.roles %}
<p>
Editors can view vocabs, view and search all records, create new records with "draft" or "complete" status,
edit their own records and those created by other editors; they can only delete their own records, as long as the status
is "draft" or "complete".
</p>
{% else %}
<p>
Readers can view and search records that are either published, excluded or unindexed (draft and complete records cannot be viewed).
</p>
{% endif %}
</div>
</article>
</div>
</div>
</div>