From: Ant Zucaro Date: Fri, 13 Jun 2014 18:18:58 +0000 (-0400) Subject: Remove old boilerplate authn and authz. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e6e0e0da1ed8b66fc32d6146ba0b0924e1782512;p=xonotic%2Fxonstat.git Remove old boilerplate authn and authz. --- diff --git a/xonstat/__init__.py b/xonstat/__init__.py index 3ce684c..d0c033f 100644 --- a/xonstat/__init__.py +++ b/xonstat/__init__.py @@ -1,7 +1,5 @@ import sqlahelper from pyramid_beaker import set_cache_regions_from_settings -from pyramid.authentication import AuthTktAuthenticationPolicy -from pyramid.authorization import ACLAuthorizationPolicy from pyramid.config import Configurator from pyramid.httpexceptions import HTTPNotFound from pyramid.renderers import JSONP @@ -34,12 +32,6 @@ def main(global_config, **settings): # for json-encoded responses config.add_renderer('jsonp', JSONP(param_name='callback')) - # authentication and authorization policies - authn_policy = AuthTktAuthenticationPolicy('secret', hashalg='sha512') - authz_policy = ACLAuthorizationPolicy() - config.set_authentication_policy(authn_policy) - config.set_authorization_policy(authz_policy) - # for static assets config.add_static_view('static', 'xonstat:static') @@ -175,6 +167,6 @@ def main(global_config, **settings): config.add_view(login, route_name="login", check_csrf=True, renderer="json") config.add_route("merge", "/merge") - config.add_view(route_name="merge", renderer="merge.mako", permission="admin") + config.add_view(route_name="merge", renderer="merge.mako", permission="merge") return config.make_wsgi_app()