Show More
@@ -133,15 +133,14 b' class ReposController(BaseRepoController' | |||
|
133 | 133 | defaults['id_fork_of'] = db_repo.fork.repo_id if db_repo.fork else '' |
|
134 | 134 | return defaults |
|
135 | 135 | |
|
136 | @HasPermissionAllDecorator('hg.admin') | |
|
137 | 136 | def index(self, format='html'): |
|
138 | 137 | """GET /repos: All items in the collection""" |
|
139 | 138 | # url('repos') |
|
139 | repo_list = Repository.query()\ | |
|
140 | .order_by(func.lower(Repository.repo_name))\ | |
|
141 | .all() | |
|
140 | 142 | |
|
141 |
c.repos_list = Repos |
|
|
142 | .order_by(func.lower(Repository.repo_name))\ | |
|
143 | .all() | |
|
144 | ||
|
143 | c.repos_list = RepoList(repo_list, perm_set=['repository.admin']) | |
|
145 | 144 | repos_data = RepoModel().get_repos_as_dict(repos_list=c.repos_list, |
|
146 | 145 | admin=True, |
|
147 | 146 | super_user_actions=True) |
@@ -403,7 +403,7 b' class AuthUser(object):' | |||
|
403 | 403 | return self.admin |
|
404 | 404 | |
|
405 | 405 | @property |
|
406 | def repos_admin(self): | |
|
406 | def repositories_admin(self): | |
|
407 | 407 | """ |
|
408 | 408 | Returns list of repositories you're an admin of |
|
409 | 409 | """ |
@@ -77,11 +77,14 b'' | |||
|
77 | 77 | </ul> |
|
78 | 78 | </%def> |
|
79 | 79 | |
|
80 | <%def name="admin_menu_simple(repository_groups=None, user_groups=None)"> | |
|
80 | <%def name="admin_menu_simple(repositories=None, repository_groups=None, user_groups=None)"> | |
|
81 | 81 | <ul> |
|
82 | %if repositories: | |
|
83 | <li>${h.link_to(_('Repositories'),h.url('repos'),class_='repos')}</li> | |
|
84 | %endif | |
|
82 | 85 | %if repository_groups: |
|
83 | 86 | <li>${h.link_to(_('Repository groups'),h.url('repos_groups'),class_='repos_groups')}</li> |
|
84 |
%endif |
|
|
87 | %endif | |
|
85 | 88 | %if user_groups: |
|
86 | 89 | <li>${h.link_to(_('User groups'),h.url('users_groups'),class_='groups')}</li> |
|
87 | 90 | %endif |
@@ -311,12 +314,13 b'' | |||
|
311 | 314 | </a> |
|
312 | 315 | ${admin_menu()} |
|
313 | 316 | </li> |
|
314 | % elif c.rhodecode_user.repository_groups_admin or c.rhodecode_user.user_groups_admin: | |
|
317 | % elif c.rhodecode_user.repositories_admin or c.rhodecode_user.repository_groups_admin or c.rhodecode_user.user_groups_admin: | |
|
315 | 318 | <li ${is_current('admin')}> |
|
316 | 319 | <a class="menu_link admin childs" title="${_('Admin')}"> |
|
317 | 320 | ${_('Admin')} |
|
318 | 321 | </a> |
|
319 |
${admin_menu_simple(c.rhodecode_user.repositor |
|
|
322 | ${admin_menu_simple(c.rhodecode_user.repositories_admin, | |
|
323 | c.rhodecode_user.repository_groups_admin, | |
|
320 | 324 | c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())} |
|
321 | 325 | </li> |
|
322 | 326 | % endif |
General Comments 0
You need to be logged in to leave comments.
Login now