No credentials request if logged in and URL contains user/login?_next=

This commit is contained in:
Richard Vézina
2015-08-19 14:41:54 -04:00
parent edcc2e44dc
commit 08b6832809

View File

@@ -2497,6 +2497,10 @@ class Auth(object):
"""
Returns a login form
"""
# Avoid asking for credentials when page reload and page URL contains
# "user/login?_next=NEXT_COMPONENT" if user is already authenticated
if self.get_vars_next() is not None and self.get_vars_next() != '' and self.is_logged_in():
redirect(self.get_vars_next())
table_user = self.table_user()
settings = self.settings