예제 #1
0
파일: noop.py 프로젝트: xuechaos/ggrc-core
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')))
예제 #2
0
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'))))
예제 #3
0
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')))
예제 #4
0
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('/')
예제 #5
0
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('/')
예제 #6
0
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('/')
예제 #7
0
파일: noop.py 프로젝트: xuechaos/ggrc-core
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('/')
예제 #8
0
def logout():
    flask_login.logout_user()
    return redirect(
        users.create_logout_url(
            get_next_url(request, default_url=url_for('index'))))
예제 #9
0
def login():
    user = get_user()
    flask_login.login_user(user)
    return redirect(get_next_url(request, default_url=url_for('dashboard')))
예제 #10
0
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'))))
예제 #11
0
def login():
  user = get_user()
  flask_login.login_user(user)
  return redirect(
    get_next_url(request, default_url=url_for('dashboard')))
예제 #12
0
def logout():
    flask_login.logout_user()
    return redirect(users.create_logout_url(get_next_url(request, default_url=url_for("index"))))
예제 #13
0
def logout():
  flask_login.logout_user()
  return redirect(get_next_url(request, default_url=url_for('index')))
예제 #14
0
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')))