def logout(): """Logs out current user.""" from ggrc.login.common import get_next_url if 'permissions' in session: del session['permissions'] flask_login.logout_user() return redirect(get_next_url(request, default_url=url_for('index')))
def logout(): if 'permissions' in session: del session['permissions'] flask_login.logout_user() return redirect( users.create_logout_url( get_next_url(request, default_url=url_for('index'))))
def login(): user = get_user() flask_login.login_user(user) #FIXME adding default permissions of None to session for now. session['permissions'] = None return redirect( get_next_url(request, default_url=url_for('dashboard')))
def login(): user = get_user() if user.system_wide_role != 'No Access': flask_login.login_user(user) return redirect(get_next_url(request, default_url=url_for('dashboard'))) else: flash(u'You do not have access. Please contact your administrator.', 'alert alert-info') return redirect('/')
def login(): """Log in current user.""" user = get_user() if user.system_wide_role != 'No Access': flask_login.login_user(user) return flask.redirect(common.get_next_url( flask.request, default_url=flask.url_for('dashboard'))) flask.flash(u'You do not have access. Please contact your administrator.', 'alert alert-info') return flask.redirect('/')
def login(): """Logs in current user.""" from ggrc.login.common import get_next_url db_user = get_user() common.commit_user_and_role(db_user) if db_user.system_wide_role != 'No Access': flask_login.login_user(db_user) return redirect(get_next_url(request, default_url=url_for('dashboard'))) flash(u'You do not have access. Please contact your administrator.', 'alert alert-info') return redirect('/')
def logout(): flask_login.logout_user() return redirect( users.create_logout_url( get_next_url(request, default_url=url_for('index'))))
def login(): user = get_user() flask_login.login_user(user) return redirect(get_next_url(request, default_url=url_for('dashboard')))
def logout(): flask_login.logout_user() return flask.redirect(users.create_logout_url(common.get_next_url( flask.request, default_url=flask.url_for('index'))))
def login(): user = get_user() flask_login.login_user(user) return redirect( get_next_url(request, default_url=url_for('dashboard')))
def logout(): flask_login.logout_user() return redirect(users.create_logout_url(get_next_url(request, default_url=url_for("index"))))
def logout(): flask_login.logout_user() return redirect(get_next_url(request, default_url=url_for('index')))
def login(): from ggrc.login.common import get_next_url user = get_user() flask_login.login_user(user) return redirect(get_next_url(request, default_url=url_for('dashboard')))