ForgeBlog/forgeblog/main.py
def install(self, project):
        'Set up any default permissions and roles here'
        super(ForgeBlogApp, self).install(project)

        # Setup permissions
        role_admin = M.ProjectRole.by_name('Admin')._id
        role_developer = M.ProjectRole.by_name('Developer')._id
        role_auth = M.ProjectRole.by_name('*authenticated')._id
        role_anon = M.ProjectRole.by_name('*anonymous')._id
        self.config.acl = [
            M.ACE.allow(role_anon, 'read'),
            M.ACE.allow(role_auth, 'post'),
            M.ACE.allow(role_auth, 'unmoderated_post'),
            M.ACE.allow(role_developer, 'write'),
            M.ACE.allow(role_developer, 'moderate'),
            M.ACE.allow(role_admin, 'configure'),
            M.ACE.allow(role_admin, 'admin'),
        ]
Set up any default permissions and roles here
Set up any default permissions and roles here
Set up any default permissions and roles here
def install(self, project):
        super(ForgeBlogApp, self).install(project)
        role_admin = M.ProjectRole.by_name('Admin')._id
        role_developer = M.ProjectRole.by_name('Developer')._id
        role_auth = M.ProjectRole.by_name('*authenticated')._id
        role_anon = M.ProjectRole.by_name('*anonymous')._id
        self.config.acl = [
            M.ACE.allow(role_anon, 'read'),
            M.ACE.allow(role_auth, 'post'),
            M.ACE.allow(role_auth, 'unmoderated_post'),
            M.ACE.allow(role_developer, 'write'),
            M.ACE.allow(role_developer, 'moderate'),
            M.ACE.allow(role_admin, 'configure'),
            M.ACE.allow(role_admin, 'admin'),
        ]
def install ( self , project ) : super ( ForgeBlogApp , self ) . install ( project ) role_admin = M . ProjectRole . by_name ( 'Admin' ) . _id role_developer = M . ProjectRole . by_name ( 'Developer' ) . _id role_auth = M . ProjectRole . by_name ( '*authenticated' ) . _id role_anon = M . ProjectRole . by_name ( '*anonymous' ) . _id self . config . acl = [ M . ACE . allow ( role_anon , 'read' ) , M . ACE . allow ( role_auth , 'post' ) , M . ACE . allow ( role_auth , 'unmoderated_post' ) , M . ACE . allow ( role_developer , 'write' ) , M . ACE . allow ( role_developer , 'moderate' ) , M . ACE . allow ( role_admin , 'configure' ) , M . ACE . allow ( role_admin , 'admin' ) , ]
Set up any default permissions and roles here
Set up any default permissions and roles here
'Set up any default permissions and roles here' # Setup permissions
self
project