CPI Ordering System (the old version)
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 

33 lines
690 B

from pyramid.security import Allow, Everyone
from .account import Account, PasswordResetAccount
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)