[FIX] potential bug with the /login url, it could not possibly work due to its authorization level.
Also modified a function that is supposed to redirect to the backend and was still using '/'. bzr revid: nicolas.vanhoren@openerp.com-20131105101548-jdsnyh2j4ak0kdbk
This commit is contained in:
parent
9a281f829b
commit
fd863b8501
|
@ -348,7 +348,7 @@ def make_conditional(response, last_modified=None, etag=None):
|
|||
response.set_etag(etag)
|
||||
return response.make_conditional(request.httprequest)
|
||||
|
||||
def login_and_redirect(db, login, key, redirect_url='/'):
|
||||
def login_and_redirect(db, login, key, redirect_url='/web'):
|
||||
request.session.authenticate(db, login, key)
|
||||
return set_cookie_and_redirect(redirect_url)
|
||||
|
||||
|
@ -569,7 +569,7 @@ class Home(http.Controller):
|
|||
}
|
||||
return request.make_response(r, {'Cache-Control': 'no-cache', 'Content-Type': 'text/html; charset=utf-8'})
|
||||
|
||||
@http.route('/login', type='http', auth="user")
|
||||
@http.route('/login', type='http', auth="none")
|
||||
def login(self, db, login, key):
|
||||
return login_and_redirect(db, login, key)
|
||||
|
||||
|
|
Loading…
Reference in New Issue