@Test public void testConfigAttSupport() { MotechAccessVoter voter = new MotechAccessVoter(); assertTrue(voter.supports(Object.class)); assertTrue(voter.supports(ConfigAttribute.class)); assertTrue(voter.supports(new SecurityConfig("access_motech"))); assertFalse(voter.supports(new SecurityConfig("aCCESS_motech"))); assertFalse(voter.supports(new SecurityConfig("nosupport"))); }
@Override public boolean supports(ConfigAttribute attribute) { return StringUtils.startsWith(attribute.getAttribute(), SecurityConfigConstants.USER_ACCESS_PREFIX); }
MotechAccessVoter implements AccessDecisionVoter<Object> { @Override public boolean supports(ConfigAttribute attribute) { return StringUtils.startsWith(attribute.getAttribute(), SecurityConfigConstants.USER_ACCESS_PREFIX); } }
MotechAccessVoter implements AccessDecisionVoter<Object> { @Override public boolean supports(ConfigAttribute attribute) { return StringUtils.startsWith(attribute.getAttribute(), SecurityConfigConstants.USER_ACCESS_PREFIX); }  }
MotechAccessVoter implements AccessDecisionVoter<Object> { @Override public boolean supports(ConfigAttribute attribute) { return StringUtils.startsWith(attribute.getAttribute(), SecurityConfigConstants.USER_ACCESS_PREFIX); }  @Override boolean supports(ConfigAttribute attribute); @Override boolean supports(Class<?> clazz); @Override int vote(Authentication authentication, Object object, Collection<ConfigAttribute> attributes); }
MotechAccessVoter implements AccessDecisionVoter<Object> { @Override public boolean supports(ConfigAttribute attribute) { return StringUtils.startsWith(attribute.getAttribute(), SecurityConfigConstants.USER_ACCESS_PREFIX); }  @Override boolean supports(ConfigAttribute attribute); @Override boolean supports(Class<?> clazz); @Override int vote(Authentication authentication, Object object, Collection<ConfigAttribute> attributes);  }