Logo Search packages:      
Sourcecode: zope-coreblog2 version File versions  Download package

permissions.py

#permissions.py
#
#$Id: permissions.py 136 2005-12-21 08:42:59Z ats $

from Products.CMFCore.CMFCorePermissions import setDefaultRoles
import Products.Archetypes.public as atapi
import config

def initialize():
    permissions = {}
    types = atapi.listTypes(config.PROJECTNAME)
    for atype in  types:
        permission = "%s: Add %s" % (config.PROJECTNAME, atype['portal_type'])
        permissions[atype['portal_type']] = permission
        setDefaultRoles(permission, ('Manager','Owner'))

    return permissions

setDefaultRoles( 'COREBlog2: Add COREBlogComment',
                            ( 'Anonymous', 'Manager', 'Owner' ) )
setDefaultRoles( 'COREBlog2: Add COREBlogTrackback',
                            ( 'Anonymous', 'Manager', 'Owner' ) )


Generated by  Doxygen 1.6.0   Back to index