protected Task updateSecurityBaseRolePermissions() { ArrayDelegateTask permissionsTask = new ArrayDelegateTask("Update security-base role", "Disallows access to some sensitive URIs and grants basic access to AdminCentral."); for (String path : PERMISSIONS_FOR_LEGACY_PAGES) { permissionsTask.addTask(new RemovePermissionTask("", SECURITY_BASE_ROLE, "uri", path, AddURIPermissionTask.DENY)); } permissionsTask.addTask(new RemovePermissionTask("", SECURITY_BASE_ROLE, RepositoryConstants.USER_ROLES, "/" + SECURITY_BASE_ROLE, Permission.READ)); return permissionsTask; }
@Test public void testAutogeneratedDescription() throws Exception { // GIVEN Task task; // WHEN task = new RemovePermissionTask("taskName", "roleName", RepositoryConstants.USER_GROUPS, "/pathToRemove", Permission.READ); // THEN assertEquals("Remove permission 'usergroups:/pathToRemove*=8' from role 'roleName'.", task.getDescription()); } }
new RemoveNodeTask("Remove legacy yaml template", "/modules/resources/templates/yaml"))) .addTask(new ArrayDelegateTask("Remove adminInterface-legacy unused ACLs for resources-base", new RemovePermissionTask("", RESOURCES_BASE_ROLE, ACL_CONFIG, "/modules/adminInterface/config/menu/templating-kit/resources", Permission.READ), new RemovePermissionTask("", RESOURCES_BASE_ROLE, ACL_CONFIG, "/modules/adminInterface/config/menu/templating-kit/resources/*", Permission.READ), new RemovePermissionTask("", RESOURCES_BASE_ROLE, ACL_CONFIG, "/modules/adminInterface/config/menu/templating-kit", Permission.READ))) );
.addTask(new AddActivatableMixinForContentNodeTask("Add the mixIn '" + NodeTypes.Activatable.NAME + "' to the '" + NodeTypes.ContentNode.NAME + "' node type definition", "", RepositoryConstants.CONFIG))); register((DeltaBuilder.update("5.2.3", "")) .addTask(new RemovePermissionTask("Remove 'anonymous' role permission", "anonymous", RepositoryConstants.USER_ROLES, "/anonymous", Permission.READ)));