Skip to content
Snippets Groups Projects
Unverified Commit 4337d945 authored by 小白's avatar 小白 Committed by GitHub
Browse files

next vaule: Priority use request.full_path

login redirect next parameter Priority use request.full_path。 full_path contains url params
parent c0554780
Branches
Tags v0.10.0
Loading
...@@ -302,7 +302,7 @@ class LDAP(object): ...@@ -302,7 +302,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
...@@ -328,7 +328,7 @@ class LDAP(object): ...@@ -328,7 +328,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