public int vote(Authentication authentication, MethodInvocation method, Collection<ConfigAttribute> attributes) { // Find prefilter and preauth (or combined) attributes // if both null, abstain // else call advice with them PreInvocationAttribute preAttr = findPreInvocationAttribute(attributes); if (preAttr == null) { // No expression based metadata, so abstain return ACCESS_ABSTAIN; } boolean allowed = preAdvice.before(authentication, method, preAttr); return allowed ? ACCESS_GRANTED : ACCESS_DENIED; }
public int vote(Authentication authentication, MethodInvocation method, Collection<ConfigAttribute> attributes) { // Find prefilter and preauth (or combined) attributes // if both null, abstain // else call advice with them PreInvocationAttribute preAttr = findPreInvocationAttribute(attributes); if (preAttr == null) { // No expression based metadata, so abstain return ACCESS_ABSTAIN; } boolean allowed = preAdvice.before(authentication, method, preAttr); return allowed ? ACCESS_GRANTED : ACCESS_DENIED; }
public int vote(Authentication authentication, MethodInvocation method, Collection<ConfigAttribute> attributes) { // Find prefilter and preauth (or combined) attributes // if both null, abstain // else call advice with them PreInvocationAttribute preAttr = findPreInvocationAttribute(attributes); if (preAttr == null) { // No expression based metadata, so abstain return ACCESS_ABSTAIN; } boolean allowed = preAdvice.before(authentication, method, preAttr); return allowed ? ACCESS_GRANTED : ACCESS_DENIED; }
public int vote(Authentication authentication, MethodInvocation method, Collection<ConfigAttribute> attributes) { // Find prefilter and preauth (or combined) attributes // if both null, abstain // else call advice with them PreInvocationAttribute preAttr = findPreInvocationAttribute(attributes); if (preAttr == null) { // No expression based metadata, so abstain return ACCESS_ABSTAIN; } boolean allowed = preAdvice.before(authentication, method, preAttr); return allowed ? ACCESS_GRANTED : ACCESS_DENIED; }