@Test public void testCheckParticipantTypesWhenUserIsParticipantTypeAnyListIsEmpty() { AccessControlRule accessControlRule = getAccessControlRuleForParticipantTypesTest(); accessControlRule.setUserIsParticipantTypeAny(new ArrayList<>()); accessControlRule.setObjectSubType("ORDER"); Collection grantedAuthorities = getGrantedAuthoritiesMockList(); mockExpectsWhenParticipantTypesTest(accessControlRule, grantedAuthorities); boolean granted = accessControlRuleChecker.isAccessGranted(authenticationMock, 1L, "CASE_FILE", "restrictCase", solrDocument); assertTrue(granted); verifyAll(); }
@Override public boolean isAccessGranted(Authentication authentication, Long targetId, String targetType, String permission, String solrDocument) { return isAccessGranted(authentication, targetId, targetType, Arrays.asList(permission.split("\\|")), solrDocument); }
AccessControlRuleCheckerImpl implements AccessControlRuleChecker { @Override public boolean isAccessGranted(Authentication authentication, Long targetId, String targetType, String permission, String solrDocument) { return isAccessGranted(authentication, targetId, targetType, Arrays.asList(permission.split("\\|")), solrDocument); } }
AccessControlRuleCheckerImpl implements AccessControlRuleChecker { @Override public boolean isAccessGranted(Authentication authentication, Long targetId, String targetType, String permission, String solrDocument) { return isAccessGranted(authentication, targetId, targetType, Arrays.asList(permission.split("\\|")), solrDocument); }  }
AccessControlRuleCheckerImpl implements AccessControlRuleChecker { @Override public boolean isAccessGranted(Authentication authentication, Long targetId, String targetType, String permission, String solrDocument) { return isAccessGranted(authentication, targetId, targetType, Arrays.asList(permission.split("\\|")), solrDocument); }  void postConstruct(); @Override boolean isAccessGranted(Authentication authentication, Long targetId, String targetType, String permission, String solrDocument); @Override AccessControlRules getAccessControlRules(); @Override void setAccessControlRules(AccessControlRules accessControlRules); File getConfigurationFile(); void setConfigurationFile(File configurationFile); ObjectConverter getObjectConverter(); void setObjectConverter(ObjectConverter objectConverter); DataAccessControlConfig getDacConfig(); void setDacConfig(DataAccessControlConfig dacConfig); }
AccessControlRuleCheckerImpl implements AccessControlRuleChecker { @Override public boolean isAccessGranted(Authentication authentication, Long targetId, String targetType, String permission, String solrDocument) { return isAccessGranted(authentication, targetId, targetType, Arrays.asList(permission.split("\\|")), solrDocument); }  void postConstruct(); @Override boolean isAccessGranted(Authentication authentication, Long targetId, String targetType, String permission, String solrDocument); @Override AccessControlRules getAccessControlRules(); @Override void setAccessControlRules(AccessControlRules accessControlRules); File getConfigurationFile(); void setConfigurationFile(File configurationFile); ObjectConverter getObjectConverter(); void setObjectConverter(ObjectConverter objectConverter); DataAccessControlConfig getDacConfig(); void setDacConfig(DataAccessControlConfig dacConfig);  }