Gestion de niveau 3 & 4 #2

Merged
afornerot merged 3 commits from morelevel into master 2022-09-29 16:05:31 +02:00
2 changed files with 9 additions and 0 deletions
Showing only changes of commit b9bb605ad2 - Show all commits

1
.php-version Normal file
View File

@ -0,0 +1 @@
8.1

View File

@ -374,11 +374,19 @@
function requireniveau() {
roles=[];
{% if access=="admin" or access=="modo" %}
if($("#user_roles_0").is(":checked")) roles.push("ROLE_ADMIN");
if($("#user_roles_1").is(":checked")) roles.push("ROLE_MODO");
if($("#user_roles_2").is(":checked")) roles.push("ROLE_MASTER");
if($("#user_roles_3").is(":checked")) roles.push("ROLE_MANAGER");
if($("#user_roles_4").is(":checked")) roles.push("ROLE_USER");
{% else %}
{% if is_granted('ROLE_ADMIN') %} roles.push("ROLE_ADMIN"); {% endif %}
{% if is_granted('ROLE_MODO') %} roles.push("ROLE_MODO"); {% endif %}
{% if is_granted('ROLE_MASTER') %} roles.push("ROLE_MASTER"); {% endif %}
{% if is_granted('ROLE_MANAGER') %} roles.push("ROLE_MANAGER"); {% endif %}
{% if is_granted('ROLE_USER') %} roles.push("ROLE_USER"); {% endif %}
{% endif %}
{% if "ALL" in appNiveau02mandatory %}
$("#user_niveau02").attr("required","required");