##// END OF EJS Templates
Do a redirect to login for anonymous users
marcink -
r1336:e9fe4ff5 beta
parent child Browse files
Show More
@@ -410,6 +410,20 class PermsDecorator(object):
410
410
411 else:
411 else:
412 log.warning('Permission denied for %s %s', cls, self.user)
412 log.warning('Permission denied for %s %s', cls, self.user)
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:
413 #redirect with forbidden ret code
427 #redirect with forbidden ret code
414 return abort(403)
428 return abort(403)
415
429
General Comments 0
You need to be logged in to leave comments. Login now