@Test public void validate_granted() throws RepositoryException { Collection<String> actions = Arrays.asList(BaseAccessRightsValidator.RIGHT_REPLICATE); when(cqActions.getAllowedActions(Mockito.any(), Mockito.any())).thenReturn(actions); assertTrue(validator.validate(true).isSuccessful()); }
@Override public ValidationResult validate(boolean simulate) { ValidationResult resourceResult = super.validate(simulate); if (!resourceResult.isSuccessful()) { return resourceResult; } if (!pageExists()) { return new ValidationResult(false, true, "Page not found"); } return canReplicatePageWithUser(simulate); }
ReplicatePageAccessValidator extends ReplicateAccessValidator { @Override public ValidationResult validate(boolean simulate) { ValidationResult resourceResult = super.validate(simulate); if (!resourceResult.isSuccessful()) { return resourceResult; } if (!pageExists()) { return new ValidationResult(false, true, "Page not found"); } return canReplicatePageWithUser(simulate); } }
ReplicatePageAccessValidator extends ReplicateAccessValidator { @Override public ValidationResult validate(boolean simulate) { ValidationResult resourceResult = super.validate(simulate); if (!resourceResult.isSuccessful()) { return resourceResult; } if (!pageExists()) { return new ValidationResult(false, true, "Page not found"); } return canReplicatePageWithUser(simulate); } ReplicatePageAccessValidator(Group group, Resource resource, AccessValidatorContext context,
            boolean checkAccessGranted, ReplicationActionType type); }
ReplicatePageAccessValidator extends ReplicateAccessValidator { @Override public ValidationResult validate(boolean simulate) { ValidationResult resourceResult = super.validate(simulate); if (!resourceResult.isSuccessful()) { return resourceResult; } if (!pageExists()) { return new ValidationResult(false, true, "Page not found"); } return canReplicatePageWithUser(simulate); } ReplicatePageAccessValidator(Group group, Resource resource, AccessValidatorContext context,
            boolean checkAccessGranted, ReplicationActionType type); @Override ValidationResult validate(boolean simulate); @Override String getLabel(); }
ReplicatePageAccessValidator extends ReplicateAccessValidator { @Override public ValidationResult validate(boolean simulate) { ValidationResult resourceResult = super.validate(simulate); if (!resourceResult.isSuccessful()) { return resourceResult; } if (!pageExists()) { return new ValidationResult(false, true, "Page not found"); } return canReplicatePageWithUser(simulate); } ReplicatePageAccessValidator(Group group, Resource resource, AccessValidatorContext context,
            boolean checkAccessGranted, ReplicationActionType type); @Override ValidationResult validate(boolean simulate); @Override String getLabel();  }