diff --git a/rhodecode/controllers/admin/repos.py b/rhodecode/controllers/admin/repos.py --- a/rhodecode/controllers/admin/repos.py +++ b/rhodecode/controllers/admin/repos.py @@ -133,15 +133,14 @@ class ReposController(BaseRepoController defaults['id_fork_of'] = db_repo.fork.repo_id if db_repo.fork else '' return defaults - @HasPermissionAllDecorator('hg.admin') def index(self, format='html'): """GET /repos: All items in the collection""" # url('repos') + repo_list = Repository.query()\ + .order_by(func.lower(Repository.repo_name))\ + .all() - c.repos_list = Repository.query()\ - .order_by(func.lower(Repository.repo_name))\ - .all() - + c.repos_list = RepoList(repo_list, perm_set=['repository.admin']) repos_data = RepoModel().get_repos_as_dict(repos_list=c.repos_list, admin=True, super_user_actions=True) diff --git a/rhodecode/lib/auth.py b/rhodecode/lib/auth.py --- a/rhodecode/lib/auth.py +++ b/rhodecode/lib/auth.py @@ -403,7 +403,7 @@ class AuthUser(object): return self.admin @property - def repos_admin(self): + def repositories_admin(self): """ Returns list of repositories you're an admin of """ 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 @@ -77,11 +77,14 @@ %def> -<%def name="admin_menu_simple(repository_groups=None, user_groups=None)"> +<%def name="admin_menu_simple(repositories=None, repository_groups=None, user_groups=None)">