From fc072a0ac1d1a06f38844c96ea0da322e7a9b780 Mon Sep 17 00:00:00 2001 From: Ramu Nerella Date: Wed, 18 Aug 2021 09:43:25 -0500 Subject: [PATCH] added redirect logic for fence idp --- fence/blueprints/login/fence_login.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fence/blueprints/login/fence_login.py b/fence/blueprints/login/fence_login.py index 80807acbb..7a3673ff4 100644 --- a/fence/blueprints/login/fence_login.py +++ b/fence/blueprints/login/fence_login.py @@ -124,6 +124,12 @@ def get(self): ) self.post_login() + if config["REGISTER_USERS_ON"]: + if not flask.g.user.additional_info.get("registration_info"): + return flask.redirect( + config["BASE_URL"] + flask.url_for("register-user.register_user") + ) + if "redirect" in flask.session: return flask.redirect(flask.session.get("redirect")) return flask.jsonify({"username": username})