Skip to content
Snippets Groups Projects
Unverified Commit 6f5e15ec authored by Alexandre Ferland's avatar Alexandre Ferland Committed by GitHub
Browse files

Merge pull request #57 from wuzhihui1123/master

 next vaule: Priority use request.full_path
parents d69968dd 4337d945
No related branches found
No related tags found
No related merge requests found
...@@ -304,7 +304,7 @@ class LDAP(object): ...@@ -304,7 +304,7 @@ class LDAP(object):
def wrapped(*args, **kwargs): def wrapped(*args, **kwargs):
if g.user is None: if g.user is None:
return redirect(url_for(current_app.config['LDAP_LOGIN_VIEW'], return redirect(url_for(current_app.config['LDAP_LOGIN_VIEW'],
next=request.path)) next=request.full_path or request.path))
return func(*args, **kwargs) return func(*args, **kwargs)
return wrapped return wrapped
...@@ -330,7 +330,7 @@ class LDAP(object): ...@@ -330,7 +330,7 @@ class LDAP(object):
if g.user is None: if g.user is None:
return redirect( return redirect(
url_for(current_app.config['LDAP_LOGIN_VIEW'], url_for(current_app.config['LDAP_LOGIN_VIEW'],
next=request.path)) next=request.full_path or request.path))
match = [group for group in groups if group in g.ldap_groups] match = [group for group in groups if group in g.ldap_groups]
if not match: if not match:
abort(401) abort(401)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment