예제 #1
0
파일: app.py 프로젝트: comlorda/nive_userdb
]

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"]
예제 #2
0
    "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:
예제 #3
0
파일: app.py 프로젝트: nive-cms/nive
    (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)
예제 #4
0
파일: app.py 프로젝트: carriercomm/nive_cms
    "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
#    }