]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Remove old boilerplate authn and authz.
authorAnt Zucaro <azucaro@gmail.com>
Fri, 13 Jun 2014 18:18:58 +0000 (14:18 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Fri, 13 Jun 2014 18:18:58 +0000 (14:18 -0400)
xonstat/__init__.py

index 3ce684c4c476dc1781f8c502686c7475ce3eb7a1..d0c033fa7f3f829148312a1bcd83805df44f361f 100644 (file)
@@ -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()