comparison rhodecode/controllers/admin/repos_groups.py @ 2831:0959096b2c02 beta

Wraps group listing with permissions check so they don't get displayed
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 12 Sep 2012 12:54:46 +0200
parents c0cc8f8a71b0
children 68e95f5ae3a7
comparison
equal deleted inserted replaced
2830:5a19d6f4283e 2831:0959096b2c02
290 290
291 c.repos_list = c.cached_repo_list 291 c.repos_list = c.cached_repo_list
292 292
293 c.repo_cnt = 0 293 c.repo_cnt = 0
294 294
295 c.groups = RepoGroup.query().order_by(RepoGroup.group_name)\ 295 groups = RepoGroup.query().order_by(RepoGroup.group_name)\
296 .filter(RepoGroup.group_parent_id == id).all() 296 .filter(RepoGroup.group_parent_id == id).all()
297 297 c.groups = self.scm_model.get_repos_groups(groups)
298 return render('admin/repos_groups/repos_groups.html') 298 return render('admin/repos_groups/repos_groups.html')
299 299
300 @HasPermissionAnyDecorator('hg.admin') 300 @HasPermissionAnyDecorator('hg.admin')
301 def edit(self, id, format='html'): 301 def edit(self, id, format='html'):
302 """GET /repos_groups/id/edit: Form to edit an existing item""" 302 """GET /repos_groups/id/edit: Form to edit an existing item"""