changeset 1829:6f8f1ab20b7d

fixes issue when owner of a repo couldn't revoke permissions for users and groups
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 04 Jan 2012 04:41:50 +0200
parents 9e53425ca824
children d0e477b5dc95
files rhodecode/controllers/admin/repos.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/controllers/admin/repos.py	Wed Jan 04 03:59:52 2012 +0200
+++ b/rhodecode/controllers/admin/repos.py	Wed Jan 04 04:41:50 2012 +0200
@@ -35,7 +35,7 @@
 
 from rhodecode.lib import helpers as h
 from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator, \
-    HasPermissionAnyDecorator
+    HasPermissionAnyDecorator, HasRepoPermissionAllDecorator
 from rhodecode.lib.base import BaseController, render
 from rhodecode.lib.utils import invalidate_cache, action_logger, repo_name_slug
 from rhodecode.lib.helpers import get_token
@@ -271,7 +271,8 @@
 
         return redirect(url('repos'))
 
-    @HasPermissionAllDecorator('hg.admin')
+
+    @HasRepoPermissionAllDecorator('repository.admin')   
     def delete_perm_user(self, repo_name):
         """
         DELETE an existing repository permission user
@@ -287,7 +288,7 @@
                     category='error')
             raise HTTPInternalServerError()
 
-    @HasPermissionAllDecorator('hg.admin')
+    @HasRepoPermissionAllDecorator('repository.admin')
     def delete_perm_users_group(self, repo_name):
         """
         DELETE an existing repository permission users group