MotechAccessVoter

public class MotechAccessVoter implements AccessDecisionVoter<Object>

A custom AccessDecisionVoter for voting on whether a specific user has access to a particular URL. For example, a security rule can specify that the users motech and admin have access to a particular URL. This loads the metadata source with attributes for ACCESS_motech and ACCESS_admin. When a user invokes that URL, an affirmative based voting system will check whether or not the user is motech or admin. If not, they are denied permission, otherwise they are granted access.

Methods

supports

public boolean supports(ConfigAttribute attribute)

supports

public boolean supports(Class<?> clazz)

vote

public int vote(Authentication authentication, Object object, Collection<ConfigAttribute> attributes)