diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2014-01-23 00:57:41 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2014-01-23 00:57:41 +0400 |
commit | 743d7b8ac1a9840c11ef1956efe068d1cf062c85 (patch) | |
tree | 948e847fb740b6ea2f0921d4e46f52a1c9a4a970 /plugins/UsersManager/templates/index.twig | |
parent | e4b425b9757abc94749dae6d37884a18a3be3919 (diff) |
refs #4564 #2589 do not allow to edit a users websites permissions if user is superuser. Reload page after successfully changing superuser permission to make sure it is afterwards possible to (edit / not edit) websites permissions
Diffstat (limited to 'plugins/UsersManager/templates/index.twig')
-rw-r--r-- | plugins/UsersManager/templates/index.twig | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/plugins/UsersManager/templates/index.twig b/plugins/UsersManager/templates/index.twig index 7be1fd343b..e165f8aa25 100644 --- a/plugins/UsersManager/templates/index.twig +++ b/plugins/UsersManager/templates/index.twig @@ -47,24 +47,36 @@ <tbody> {% set accesValid %}<img src='plugins/UsersManager/images/ok.png' class='accessGranted' />{% endset %} {% set accesInvalid %}<img src='plugins/UsersManager/images/no-access.png' class='updateAccess' />{% endset %} + {% set superUserAccess %}<span title="{{ 'This_User_Has_SuperUser_Access_And_Therefore_Access_To_All_Websites_Remove_SuperUser_Permission_To_SetPermission'|translate }}">N/A</span>{% endset %} {% for login,access in usersAccessByWebsite %} <tr> <td id='login'>{{ login }}</td> <td>{{ usersAliasByLogin[login]|raw }}</td> - - {% if access == 'superuser' %} - <td colspan="3"><span title="{{ 'Remove_SuperUser_Permission_To_ChangePermission'|translate }}">{{ 'Installation_SuperUser'|translate }}</span></td> - {% else %} - <td id='noaccess'>{% if access=='noaccess' and idSiteSelected != 'all' %}{{ accesValid }}{% else %}{{ accesInvalid }}{% endif %} </td> - <td id='view'>{% if access == 'view' and idSiteSelected != 'all' %}{{ accesValid }}{% else %}{{ accesInvalid }}{% endif %} </td> + <td id='noaccess'> + {% if login in superUserLogins %} + {{ superUserAccess }} + {% elseif access=='noaccess' and idSiteSelected != 'all' %} + {{ accesValid }} + {% else %} + {{ accesInvalid }} + {% endif %} </td> + <td id='view'> + {% if login in superUserLogins %} + {{ superUserAccess }} + {% elseif access == 'view' and idSiteSelected != 'all' %} + {{ accesValid }} + {% else %} + {{ accesInvalid }} + {% endif %} </td> <td id='admin'> - {% if login == 'anonymous' %} + {% if login in superUserLogins %} + {{ superUserAccess }} + {% elseif login == 'anonymous' %} N/A {% else %} {% if access == 'admin' and idSiteSelected != 'all' %}{{ accesValid }}{% else %}{{ accesInvalid }}{% endif %} {% endif %} </td> - {% endif %} </tr> {% endfor %} </tbody> |