] configuration.acl = [ #(Allow, Everyone, "signup"), # signup is disabled by default (Allow, Everyone, "view"), (Allow, Authenticated, "updateuser"), (Allow, "group:useradmin", "contactuser"), (Allow, "group:useradmin", "removeuser"), (Allow, "group:useradmin", "signup"), (Allow, "group:useradmin", "manage users"), (Allow, "group:admin", ALL_PERMISSIONS), (Deny, Everyone, ALL_PERMISSIONS), ] configuration.groups = [ GroupConf(id="group:useradmin", name="group:useradmin"), GroupConf(id="group:admin", name="group:admin") ] class UserDB(ApplicationBase): """ """ implements(IUserDatabase) def Groupfinder(self, userid, request=None, context=None): """ returns the list of groups assigned to the user """ if request: try: user = request.environ["authenticated_user"]
"nive.components.tools.dbStructureUpdater", # administration and persistence "nive.adminview", #"nive.components.extensions.persistence.dbPersistenceConfiguration" ] configuration.acl= [ (Allow, Everyone, 'view'), (Allow, Everyone, 'updateuser'), (Allow, "group:useradmin", 'signup'), (Allow, "group:useradmin", 'manage users'), (Allow, "group:admin", ALL_PERMISSIONS), ] configuration.groups = [ GroupConf(id="group:useradmin", name="group:useradmin"), ] class UserDB(ApplicationBase): """ """ implements(IUserDatabase) def Groupfinder(self, userid, request=None, context=None): """ returns the list of groups assigned to the user """ if request:
(Allow, 'group:editor', 'read'), (Allow, 'group:editor', 'add'), (Allow, 'group:editor', 'edit'), (Allow, 'group:editor', 'delete'), (Allow, 'group:editor', 'publish'), (Allow, 'group:editor', 'revoke'), (Allow, 'group:author', 'read'), (Allow, 'group:author', 'add'), (Allow, 'group:author', 'edit'), (Allow, 'group:author', 'delete'), (Allow, 'group:reviewer', 'read'), (Allow, 'group:reviewer', 'publish'), (Allow, 'group:reviewer', 'revoke'), (Allow, 'group:reader', 'read'), (Allow, 'group:admin', ALL_PERMISSIONS), (Deny, Everyone, ALL_PERMISSIONS), ] configuration.groups = [ GroupConf(id="group:editor", name="group:editor"), GroupConf(id="group:author", name="group:author"), GroupConf(id="group:reviewer", name="group:reviewer"), GroupConf(id="group:reader", name="group:reader"), GroupConf(id="group:admin", name="group:admin"), ] class WebsitePublisher(ApplicationBase): """ the main cms application class """ implements(IWebsite)
"nive.adminview", "nive.extensions.persistence.dbPersistenceConfiguration" ] configuration.acl = [ # basic permissions. explicit view definitions are part of the view modules' conf. (Allow, Everyone, 'view'), (Allow, Everyone, 'api-subtree'), (Allow, 'group:admin', ALL_PERMISSIONS), (Deny, Everyone, ALL_PERMISSIONS), ] configuration.groups = [ GroupConf(id="group:editor", name="group:editor"), GroupConf(id="group:author", name="group:author"), GroupConf(id="group:reviewer", name="group:reviewer"), GroupConf(id="group:reader", name="group:reader"), GroupConf(id="group:admin", name="group:admin"), ] """ Web api support --------------- A simple example how to enable and integrate the json subtree renderer for the website """ #configuration.modules.append("nive_datastore.webapi") #configuration.extensions=("nive_datastore.app.DataStorage",) #configuration.subtree = {"page": { # "descent": ("nive.definitions.IPageElement",), # item types or interfaces to descent into subtree # "fields": {}, # if empty uses type definition toJson defaults # }