diff --git a/ordr2/resources/__init__.py b/ordr2/resources/__init__.py index b577c27..8d0834b 100644 --- a/ordr2/resources/__init__.py +++ b/ordr2/resources/__init__.py @@ -1,6 +1,7 @@ from pyramid.security import Allow, Everyone from .account import Account +from .admin import Admin from .base import BaseResource @@ -11,7 +12,8 @@ class Root(BaseResource): __parent__ = None _nodes = { - 'account': Account + 'account': Account, + 'admin': Admin } def __init__(self, request): diff --git a/ordr2/resources/admin.py b/ordr2/resources/admin.py new file mode 100644 index 0000000..01c04fb --- /dev/null +++ b/ordr2/resources/admin.py @@ -0,0 +1,9 @@ +from pyramid.security import Allow, Authenticated, Deny, Everyone + +from .base import BaseResource + + +class Admin(BaseResource): + + def __acl__(self): + return [ (Allow, 'role:admin', 'view') ] diff --git a/ordr2/static/css/style.css b/ordr2/static/css/style.css index ea79ca6..909455c 100755 --- a/ordr2/static/css/style.css +++ b/ordr2/static/css/style.css @@ -731,3 +731,4 @@ input[value="new_password:mapping"] + div { margin-bottom:10px; } padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid #aaa;} +div.alert a { color:inherit; text-decoration:underline; } diff --git a/ordr2/templates/admin/admin_section.jinja2 b/ordr2/templates/admin/admin_section.jinja2 new file mode 100644 index 0000000..9ac9d70 --- /dev/null +++ b/ordr2/templates/admin/admin_section.jinja2 @@ -0,0 +1,36 @@ +{% extends "ordr2:templates/layout.jinja2" %} +{% import 'ordr2:templates/macros.jinja2' as macros with context %} + +{% block subtitle %} Admin {% endblock subtitle %} + +{% block content %} +