You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
668 B
33 lines
668 B
from pyramid.security import Allow, Everyone |
|
|
|
from .account import Account |
|
from .admin import Admin, UserList, UserAccount |
|
from .base import BaseResource |
|
|
|
|
|
class Root(BaseResource): |
|
''' Root resource ''' |
|
|
|
__name__ = None |
|
__parent__ = None |
|
|
|
nodes = { |
|
'account': Account, |
|
'admin': Admin |
|
} |
|
|
|
def __init__(self, request): |
|
self.request = request |
|
|
|
def __acl__(self): |
|
return [ (Allow, Everyone, 'view') ] |
|
|
|
|
|
def includeme(config): |
|
''' |
|
Initialize the resources for traversal in a Pyramid app. |
|
|
|
Activate this setup using ``config.include('ordr2.resources')``. |
|
|
|
''' |
|
config.set_root_factory(Root)
|
|
|