def login(): # pragma: no cover """ Login mechanism for this application. """ next_url = flask.url_for('ui_ns.index') if 'next' in flask.request.values: if is_safe_url(flask.request.values['next']): next_url = flask.request.values['next'] if next_url == flask.url_for('ui_ns.login'): next_url = flask.url_for('ui_ns.index') if hasattr(flask.g, 'fas_user') and flask.g.fas_user is not None: return flask.redirect(next_url) else: return FAS.login(return_url=next_url)
def login(): # pragma: no cover """ Login mechanism for this application. """ next_url = flask.url_for('ui_ns.index') if 'next' in flask.request.args: next_url = flask.request.args['next'] elif 'next' in flask.request.form: next_url = flask.request.form['next'] if next_url == flask.url_for('ui_ns.login'): next_url = flask.url_for('ui_ns.index') if hasattr(flask.g, 'fas_user') and flask.g.fas_user is not None: return flask.redirect(next_url) else: return FAS.login(return_url=next_url)
def login(): # pragma: no cover """ Login mechanism for this application. """ next_url = flask.url_for("ui_ns.index") if "next" in flask.request.values: if is_safe_url(flask.request.values["next"]): next_url = flask.request.values["next"] if next_url == flask.url_for("ui_ns.login"): next_url = flask.url_for("ui_ns.index") if hasattr(flask.g, "fas_user") and flask.g.fas_user is not None: return flask.redirect(next_url) else: groups = pkgdblib.get_groups(SESSION) groups.extend(APP.config["ADMIN_GROUP"]) groups.append("packager") return FAS.login(return_url=next_url, groups=groups)
def login(): # pragma: no cover """ Login mechanism for this application. """ next_url = flask.url_for('ui_ns.index') if 'next' in flask.request.values: if is_safe_url(flask.request.values['next']): next_url = flask.request.values['next'] if next_url == flask.url_for('ui_ns.login'): next_url = flask.url_for('ui_ns.index') if hasattr(flask.g, 'fas_user') and flask.g.fas_user is not None: return flask.redirect(next_url) else: groups = pkgdblib.get_groups(SESSION) groups.extend(APP.config['ADMIN_GROUP']) groups.append('packager') return FAS.login(return_url=next_url, groups=groups)
def login(): # pragma: no cover """ Login mechanism for this application. """ next_url = flask.url_for('ui_ns.index') if 'next' in flask.request.values: if is_safe_url(flask.request.values['next']): next_url = flask.request.values['next'] if next_url == flask.url_for('ui_ns.login'): next_url = flask.url_for('ui_ns.index') if hasattr(flask.g, 'fas_user') and flask.g.fas_user is not None: return flask.redirect(next_url) else: groups = pkgdblib.get_groups(SESSION) groups.extend(APP.config['ADMIN_GROUP']) groups.append(APP.config.get('PKGER_GROUP', 'packager')) return FAS.login(return_url=next_url, groups=groups)