policies/expression: fix pb_is_sso_flow
This commit is contained in:
parent
c481558a46
commit
38ad8e5fd3
|
@ -72,7 +72,6 @@ class LoginView(UserPassesTestMixin, FormView):
|
||||||
if not pre_user:
|
if not pre_user:
|
||||||
# No user found
|
# No user found
|
||||||
return self.invalid_login(self.request)
|
return self.invalid_login(self.request)
|
||||||
# self.request.session.flush()
|
|
||||||
self.request.session[AuthenticationView.SESSION_PENDING_USER] = pre_user.pk
|
self.request.session[AuthenticationView.SESSION_PENDING_USER] = pre_user.pk
|
||||||
return _redirect_with_qs("passbook_core:auth-process", self.request.GET)
|
return _redirect_with_qs("passbook_core:auth-process", self.request.GET)
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Evaluator:
|
||||||
"""Return dictionary with additional global variables passed to expression"""
|
"""Return dictionary with additional global variables passed to expression"""
|
||||||
# update passbook/policies/expression/templates/policy/expression/form.html
|
# update passbook/policies/expression/templates/policy/expression/form.html
|
||||||
# update docs/policies/expression/index.md
|
# update docs/policies/expression/index.md
|
||||||
kwargs["pb_is_sso_flow"] = request.user.session.get(
|
kwargs["pb_is_sso_flow"] = request.http_request.session.get(
|
||||||
AuthenticationView.SESSION_IS_SSO_LOGIN, False
|
AuthenticationView.SESSION_IS_SSO_LOGIN, False
|
||||||
)
|
)
|
||||||
kwargs["pb_is_group_member"] = Evaluator.jinja2_func_is_group_member
|
kwargs["pb_is_group_member"] = Evaluator.jinja2_func_is_group_member
|
||||||
|
|
Reference in New Issue