def updateFilteredDefaults(): defaultRight().allGet(IUserActionService, filter=filterAuthenticated()) # Provides access for performing login defaultRight().add( ref(IAuthenticationService).requestLogin, ref(IAuthenticationService).performLogin) # Provides read only access to the logged in user defaultRight().add(ref(IUserService).getById, filter=filterAuthenticated())
def registerAclLivedeskUpdate(): r = rightLivedeskUpdate() r.allGet(IBlogSyncService) r.add(ref(IBlogSyncService).insert, ref(IBlogSyncService).update, filter=filterAuthenticated()) r.add(ref(IBlogSyncService).delete) r.addActions(menuAction(), subMenuAction(), modulesAction(), modulesEditAction(), modulesBlogEditAction(), dashboardAction(), modulesAddAction(), modulesConfigureAction(), modulesManageCollaboratorsAction(), modulesManageFeedsAction(), modulesBlogPublishAction(), modulesBlogPostPublishAction()) r.all(IBlogService, IBlogPostService, IBlogCollaboratorService, IBlogThemeService, IBlogTypePostService, IBlogTypeService, IPersonService, IPersonIconService, ISourceService, ICollaboratorService)
def registerAclManageOwnPost(): r = rightManageOwnPost() r.addActions(menuAction(), subMenuAction(), modulesAction(), modulesEditAction(), dashboardAction()) r.allGet(IBlogService, filter=filterCollaboratorBlog()) r.allGet(ISourceService) r.add(ref(IBlogPostService).delete) # TODO: add: filter=filterOwnPost(), also the override crates problems, this should have been on IPostService r.add(ref(IBlogPostService).insert, ref(IBlogPostService).update, filter=filterCollaboratorBlog()) r.add(ref(IBlogPostService).publish, ref(IBlogPostService).insertAndPublish, ref(IBlogPostService).unpublish, ref(IBlogPostService).reorder, ref(IBlogCollaboratorService).addCollaborator, ref(IBlogCollaboratorService).addCollaboratorAsDefault, filter=filterAdminBlog()) r.add(ref(IBlogPostService).update) # TODO: add: filter=filterOwnPost()
def registerAclLivedeskView(): r = rightLivedeskView() r.addActions(menuAction(), subMenuAction(), modulesAction(), modulesArchiveAction(), dashboardAction()) r.allGet(IBlogTypeService, IBlogTypePostService, IPersonService, IPersonIconService) r.allGet(IBlogService, IBlogCollaboratorService, IBlogPostService, filter=filterCollaboratorBlog()) r.allGet(ISourceService) r.add(ref(IBlogService).getAll, filter=filterAuthenticated()) r.allGet(IBlogPostService, filter=filterClosedBlog()) r.allGet(IPostVerificationService) r.allGet(ILanguageService) r.allGet(IRoleService) r.allGet(IPostService) r.allGet(IPostTypeService) r.allGet(ISourceTypeService) r.allGet(IVerificationStatusService) r.allGet(IUserTypeService) r.allGet(IBlogMediaTypeService) r.allGet(IRightService) r.allGet(IRightTypeService) r.allGet(IVersionService) r.allGet(IMetaDataService) r.allGet(IUserService) r.allGet(IUserRbacService) r.allGet(IGeneralSettingService) r.allGet(IBlogSourceService) r.allGet(IBlogCommentService) r.allGet(ICollaboratorService) r.allGet(IURLInfoService) r.allGet(IBlogSeoService)
def registerAclLivedeskView(): r = rightLivedeskView() r.addActions(menuAction(), subMenuAction(), modulesAction(), modulesArchiveAction(), dashboardAction()) r.allGet(IBlogTypeService, IBlogTypePostService, IPersonService, IPersonIconService) r.allGet(IBlogService, IBlogCollaboratorService, IBlogPostService, filter=filterCollaboratorBlog()) r.allGet(ISourceService) r.add(ref(IBlogService).getAll, filter=filterAuthenticated())
def updateAlternates(): acl.aclAlternate( ref(IActionManagerService).getAll, ref(IUserActionService).getAll)
def updateBindersForAssignToRole(): binders().append(intercept(ref(IRightService).insert, handlers=proxyAssignRoleToRigh))
def updateCaptchaForComments(): captcha().add(ref(IBlogCommentService).addComment)
def registerAclUserUpdate(): r = rightUserUpdate() r.add(ref(IMetaDataUploadService).insert, filter=filterAuthenticated())
def registerAclLivedeskUpdate(): r = rightLivedeskUpdate() r.allGet(IBlogSyncService) r.add(ref(IBlogSyncService).insert, ref(IBlogSyncService).update, filter=filterAuthenticated()) r.add(ref(IBlogSyncService).delete) r.addActions(menuAction(), subMenuAction(), modulesAction(), modulesEditAction(), modulesBlogEditAction(), dashboardAction(), modulesAddAction(), modulesConfigureAction(), modulesManageCollaboratorsAction(), modulesManageFeedsAction(), modulesBlogPublishAction(), modulesBlogPostPublishAction()) r.all(IBlogService, IBlogPostService, IBlogCollaboratorService, IBlogThemeService, IBlogTypePostService, IBlogTypeService, IPersonService, IPersonIconService, ISourceService, ICollaboratorService) r.add(ref(IBlogPostService).insert, ref(IBlogPostService).update, ref(IBlogPostService).publish, ref(IBlogPostService).insertAndPublish, ref(IBlogPostService).unpublish, ref(IBlogPostService).reorder, ref(IBlogPostService).delete, filter=filterClosedBlog()) r.add(ref(IBlogPostService).update) r.add(ref(IPostVerificationService).update) r.add( ref(IBlogSeoService).insert, ref(IBlogSeoService).update, ref(IBlogSeoService).delete) r.add( ref(IBlogSourceService).addSource, ref(IBlogSourceService).deleteSource) r.add( ref(IUserRbacService).unassignRole, ref(IUserRbacService).assignRole, ref(IUserRbacService).unassignRight, ref(IUserRbacService).assignRight)
def updateFilteredDefaults(): defaultRight().allGet(IUserActionService, filter=filterAuthenticated()) # Provides access for performing login defaultRight().add(ref(IAuthenticationService).requestLogin, ref(IAuthenticationService).performLogin) # Provides read only access to the logged in user defaultRight().add(ref(IUserService).getById, filter=filterAuthenticated())
def updateAlternates(): acl.aclAlternate(ref(IActionManagerService).getAll, ref(IUserActionService).getAll)
def registerAclLivedeskUpdate(): r = rightLivedeskUpdate() r.allGet(IBlogSyncService) r.add(ref(IBlogSyncService).insert, ref(IBlogSyncService).update, filter=filterAuthenticated()) r.add(ref(IBlogSyncService).delete) r.addActions(menuAction(), subMenuAction(), modulesAction(), modulesEditAction(), modulesBlogEditAction(), dashboardAction(), modulesAddAction(), modulesConfigureAction(), modulesManageCollaboratorsAction(), modulesManageFeedsAction(), modulesBlogPublishAction(), modulesBlogPostPublishAction()) r.all(IBlogService, IBlogPostService, IBlogCollaboratorService, IBlogThemeService, IBlogTypePostService, IBlogTypeService, IPersonService, IPersonIconService, ISourceService, ICollaboratorService) r.add(ref(IBlogPostService).insert, ref(IBlogPostService).update, ref(IBlogPostService).publish, ref(IBlogPostService).insertAndPublish, ref(IBlogPostService).unpublish, ref(IBlogPostService).reorder, ref(IBlogPostService).delete, filter=filterClosedBlog()) r.add(ref(IBlogPostService).update) r.add(ref(IPostVerificationService).update) r.add(ref(IBlogSeoService).insert, ref(IBlogSeoService).update) r.add(ref(IBlogSourceService).addSource, ref(IBlogSourceService).deleteSource) r.add(ref(IUserRbacService).unassignRole, ref(IUserRbacService).assignRole, ref(IUserRbacService).unassignRight, ref(IUserRbacService).assignRight)