Show More
@@ -355,6 +355,8 b' class AuthUser(object):' | |||
|
355 | 355 | setattr(self, k, v) |
|
356 | 356 | self.set_authenticated() |
|
357 | 357 | is_user_loaded = True |
|
358 | else: | |
|
359 | log.debug('No data in %s that could been used to log in' % self) | |
|
358 | 360 | |
|
359 | 361 | if not is_user_loaded: |
|
360 | 362 | # if we cannot authenticate user try anonymous |
@@ -661,12 +663,13 b' class PermsFunction(object):' | |||
|
661 | 663 | |
|
662 | 664 | def __call__(self, check_Location=''): |
|
663 | 665 | user = request.user |
|
666 | log.debug('checking %s %s %s', self.__class__.__name__, | |
|
667 | self.required_perms, user) | |
|
664 | 668 | if not user: |
|
669 | log.debug('Empty request user') | |
|
665 | 670 | return False |
|
666 | 671 | self.user_perms = user.permissions |
|
667 | 672 | self.granted_for = user |
|
668 | log.debug('checking %s %s %s', self.__class__.__name__, | |
|
669 | self.required_perms, user) | |
|
670 | 673 | |
|
671 | 674 | if self.check_permissions(): |
|
672 | 675 | log.debug('Permission granted %s @ %s', self.granted_for, |
@@ -136,7 +136,6 b' class BaseController(WSGIController):' | |||
|
136 | 136 | cookie_store = CookieStoreWrapper(session.get('rhodecode_user')) |
|
137 | 137 | user_id = cookie_store.get('user_id', None) |
|
138 | 138 | username = get_container_username(environ, config) |
|
139 | ||
|
140 | 139 | auth_user = AuthUser(user_id, api_key, username) |
|
141 | 140 | request.user = auth_user |
|
142 | 141 | self.rhodecode_user = c.rhodecode_user = auth_user |
General Comments 0
You need to be logged in to leave comments.
Login now