# HG changeset patch # User Marcin Kuzminski # Date 2019-03-27 09:41:12 # Node ID 8905c773886871707496e8580e67290b71a989f6 # Parent 1fe68664081404f3a3bf25bcf7ce3190a8441689 admin menu: cleanup case conditions diff --git a/rhodecode/templates/base/base.mako b/rhodecode/templates/base/base.mako --- a/rhodecode/templates/base/base.mako +++ b/rhodecode/templates/base/base.mako @@ -75,27 +75,36 @@ <%def name="admin_menu(active=None)"> + <% + is_super_admin = c.rhodecode_user.is_admin + repositories=c.rhodecode_user.repositories_admin + repository_groups=c.rhodecode_user.repository_groups_admin + user_groups=c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')() + is_delegated_admin = repositories or repository_groups or user_groups + + def is_active(selected): + if selected == active: + return "active" + %> +
- ${_('Admin Panel')} + % if is_super_admin: + ${_('Super Admin Panel')} + % else: + ${_('Delegated Admin Panel')} + % endif
-