diff --git a/rhodecode/lib/auth.py b/rhodecode/lib/auth.py
--- a/rhodecode/lib/auth.py
+++ b/rhodecode/lib/auth.py
@@ -401,6 +401,22 @@ class AuthUser(object):
return self.admin
@property
+ def repos_admin(self):
+ """
+ Returns list of repositories you're an admin of
+ """
+ return [x[0] for x in self.permissions['repositories'].iteritems()
+ if x[1] == 'repository.admin']
+
+ @property
+ def groups_admin(self):
+ """
+ Returns list of repositories groups you're an admin of
+ """
+ return [x[0] for x in self.permissions['repositories_groups'].iteritems()
+ if x[1] == 'group.admin']
+
+ @property
def ip_allowed(self):
"""
Checks if ip_addr used in constructor is allowed from defined list of
diff --git a/rhodecode/templates/admin/repos_groups/repos_groups_edit.html b/rhodecode/templates/admin/repos_groups/repos_groups_edit.html
--- a/rhodecode/templates/admin/repos_groups/repos_groups_edit.html
+++ b/rhodecode/templates/admin/repos_groups/repos_groups_edit.html
@@ -23,7 +23,7 @@
${self.breadcrumbs()}
-
- ${h.link_to(_(u'Add new child group'),h.url('new_repos_group', parent_group=c.repos_group.group_id))}
+ ${h.link_to(_(u'Add child group'),h.url('new_repos_group', parent_group=c.repos_group.group_id))}
diff --git a/rhodecode/templates/admin/repos_groups/repos_groups_show.html b/rhodecode/templates/admin/repos_groups/repos_groups_show.html
--- a/rhodecode/templates/admin/repos_groups/repos_groups_show.html
+++ b/rhodecode/templates/admin/repos_groups/repos_groups_show.html
@@ -19,7 +19,9 @@
${self.breadcrumbs()}
-
- ${h.link_to(_(u'Add new group'),h.url('new_repos_group'))}
+ %if h.HasPermissionAny('hg.admin')():
+ ${h.link_to(_(u'Add group'),h.url('new_repos_group'))}
+ %endif
diff --git a/rhodecode/templates/base/base.html b/rhodecode/templates/base/base.html
--- a/rhodecode/templates/base/base.html
+++ b/rhodecode/templates/base/base.html
@@ -234,24 +234,36 @@
%endif
% if h.HasPermissionAll('hg.admin')('access admin main page'):
-
- ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
- <%def name="admin_menu()">
-
- - ${h.link_to(_('admin journal'),h.url('admin_home'),class_='journal')}
- - ${h.link_to(_('repositories'),h.url('repos'),class_='repos')}
- - ${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}
- - ${h.link_to(_('users'),h.url('users'),class_='users')}
- - ${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}
- - ${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}
- - ${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}
- - ${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}
- - ${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}
-
- %def>
- ## ADMIN MENU
- ${admin_menu()}
-
+
+ ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
+ <%def name="admin_menu()">
+
+ - ${h.link_to(_('admin journal'),h.url('admin_home'),class_='journal')}
+ - ${h.link_to(_('repositories'),h.url('repos'),class_='repos')}
+ - ${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}
+ - ${h.link_to(_('users'),h.url('users'),class_='users')}
+ - ${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}
+ - ${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}
+ - ${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}
+ - ${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}
+ - ${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}
+
+ %def>
+ ## ADMIN MENU
+ ${admin_menu()}
+
+ ## if you're a admin of any groups, show admin menu for it
+ % elif c.rhodecode_user.groups_admin:
+
+ ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
+ <%def name="admin_menu_simple()">
+
+ - ${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}
+
+ %def>
+ ## ADMIN MENU
+ ${admin_menu_simple()}
+
% endif
@@ -322,7 +334,7 @@
${_('Search')}
- %if h.HasPermissionAll('hg.admin')('access admin main page'):
+ % if h.HasPermissionAll('hg.admin')('access admin main page'):
${admin_menu()}
- %endif
+ % elif c.rhodecode_user.groups_admin:
+
+
+ ${admin_menu_simple()}
+
+ % endif
${usermenu()}
%endif