##// END OF EJS Templates
Do a redirect to login for anonymous users
marcink -
r1336:e9fe4ff5 beta
parent child Browse files
Show More
@@ -410,8 +410,22 b' class PermsDecorator(object):'
410 410
411 411 else:
412 412 log.warning('Permission denied for %s %s', cls, self.user)
413 #redirect with forbidden ret code
414 return abort(403)
413
414
415 anonymous = self.user.username == 'default'
416
417 if anonymous:
418 p = url.current()
419
420 import rhodecode.lib.helpers as h
421 h.flash(_('You need to be a signed in to '
422 'view this page'),
423 category='warning')
424 return redirect(url('login_home', came_from=p))
425
426 else:
427 #redirect with forbidden ret code
428 return abort(403)
415 429
416 430 def check_permissions(self):
417 431 """Dummy function for overriding"""
General Comments 0
You need to be logged in to leave comments. Login now