From: Ant Zucaro Date: Fri, 23 Dec 2016 19:00:18 +0000 (-0500) Subject: Remove Persona since it was shut down. :( X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2Fremove-persona;p=xonotic%2Fxonstat.git Remove Persona since it was shut down. :( --- diff --git a/development.ini b/development.ini index e7f2533..62c9c36 100755 --- a/development.ini +++ b/development.ini @@ -20,11 +20,6 @@ cache.regions = hourly_term cache.type = memory cache.hourly_term.expire = 3600 -# Mozilla Persona settings -persona.secret = This is a secret string. Please change me! -persona.audiences = http://localhost:6543 -persona.siteName = XonStat - ##### XONSTAT CONFIG SETTINGS ##### # how many "real" players are required before the data diff --git a/setup.py b/setup.py index 9e4fddc..a3573d2 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,6 @@ requires = [ 'psycopg2', 'pyramid_beaker', 'pyramid_mako', - 'pyramid_persona', 'waitress', ] diff --git a/xonstat/__init__.py b/xonstat/__init__.py index 75c4d2a..f72e5b9 100644 --- a/xonstat/__init__.py +++ b/xonstat/__init__.py @@ -1,6 +1,5 @@ import sqlahelper from pyramid_beaker import set_cache_regions_from_settings -from pyramid.authentication import AuthTktAuthenticationPolicy from pyramid.config import Configurator from pyramid.httpexceptions import HTTPNotFound from pyramid.renderers import JSONP @@ -28,15 +27,6 @@ def main(global_config, **settings): # mako for templating config.include('pyramid_mako') - # Mozilla Persona as the login verifier. It defines default - # authentication and authorization policies. - config.include('pyramid_persona') - - # override the authn policy to provide a callback - secret = settings.get('persona.secret', None) - authn_policy = AuthTktAuthenticationPolicy(secret, callback=groupfinder, hashalg='sha512') - config.set_authentication_policy(authn_policy) - # for json-encoded responses config.add_renderer('jsonp', JSONP(param_name='callback')) diff --git a/xonstat/templates/login.mako b/xonstat/templates/login.mako index 3467eb1..11c38da 100644 --- a/xonstat/templates/login.mako +++ b/xonstat/templates/login.mako @@ -5,12 +5,6 @@ ${nav.nav('players')} -<%block name="js"> -${parent.js()} - - - - <%block name="title"> Login @@ -18,6 +12,5 @@ Login
Hello ${user} - ${request.persona_button}
diff --git a/xonstat/templates/nav.mako b/xonstat/templates/nav.mako index 645909f..deea128 100644 --- a/xonstat/templates/nav.mako +++ b/xonstat/templates/nav.mako @@ -33,9 +33,6 @@
  • Servers
  • Maps
  • Search
  • - % if login_logout: -
  • ${request.persona_button}
  • - % endif
  • Contribute
  • diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index 956d335..d0d619f 100644 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -2,11 +2,8 @@ <%namespace name="nav" file="nav.mako" /> <%block name="navigation"> - % if player.email_addr is not None: - ${nav.nav('players', True)} - % else: + ##### Disable the login button until a replacement is implemented. ${nav.nav('players', False)} - % endif <%block name="css"> @@ -48,8 +45,6 @@ drawAccuracyChart("#accuracyChart", data); }); - - <%block name="title"> diff --git a/xonstat/templates/player_merge.mako b/xonstat/templates/player_merge.mako index 5e8a35a..8308382 100644 --- a/xonstat/templates/player_merge.mako +++ b/xonstat/templates/player_merge.mako @@ -5,12 +5,6 @@ ${nav.nav('players')} -<%block name="js"> -${parent.js()} - - - - <%block name="title"> Merge Players diff --git a/xonstat/views/admin.py b/xonstat/views/admin.py index 9186d50..48eebb8 100644 --- a/xonstat/views/admin.py +++ b/xonstat/views/admin.py @@ -1,7 +1,6 @@ from pyramid.httpexceptions import HTTPFound from pyramid.security import remember from pyramid.session import check_csrf_token -from pyramid_persona.views import verify_login from xonstat.models import DBSession, Player @@ -13,7 +12,8 @@ def forbidden(request): def login(request): # Verify the assertion and get the email of the user - persona_email = verify_login(request) + # Short-circuit this to prevent anyone from logging in right now. + persona_email = None # Check that the email exists in the players table player_email = DBSession.query(Player).\