Changeset - 226e0154da46
[Not reviewed]
default
0 1 0
Mads Kiilerich - 9 years ago 2016-10-24 15:18:51
madski@unity3d.com
auth: when logging HasPermissionAny, make it clear that the scope is global, not unknown
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/auth.py
Show inline comments
 
@@ -969,12 +969,15 @@ class PermsFunction(object):
 
class HasPermissionAny(PermsFunction):
 
    def check_permissions(self):
 
        if self.required_perms.intersection(self.user_perms.get('global')):
 
            return True
 
        return False
 

	
 
    def _scope(self):
 
        return 'global'
 

	
 

	
 
class HasRepoPermissionAny(PermsFunction):
 
    def __call__(self, repo_name=None, check_location=''):
 
        self.repo_name = repo_name
 
        return super(HasRepoPermissionAny, self).__call__(check_location)
 

	
0 comments (0 inline, 0 general)