It would be good to know more about your requirements and your configuration, but I would say the the AccessDecisionVoter should get all it needs to make decisions as its parameters.
It would be good to know more about your requirements and your configuration, but I would say the the AccessDecisionVoter should get all it needs to make decisions as its parameters: Authentication object should contain the GrantedAuthorities Object that's being secured should be you article ConfigAttributes should pretty much be any additional info used to make the decision In your case (again, not knowing much about the design of you system), I'd either go for creating something like public class SpecificArticlesGrantedAuthority implements GrantedAuthority { private final Collection grantedArticleIds; //Constructor //Getter for the IDs } and holding that in your Authentication object. Alternatively, use a PermissionEvaluator rather than AccessDecisionVoter, which is suited better for ACL-like functionality (but is only available since Spring 3.0).
Thanks Michal. Spot on. – user456147 Apr 24 at 20:33.
Probably a better and more clean way of doing this is to create your own filter (which will have easy access to the request object) that adds the ACCESS_GRANTED GrantedAuthority for that user.
Thanks for the reply. Do you have any examples that illustrate this? If I add the ACCESS_GRANTED I will need to revoke it at the end of the request.
The issue is that the user only has edit rights over the document they initiate. – user456147 Mar 5 at 23:53 Not at the moment. On your comment of revoking the authority, that is perfect for a filter since they "wrap" the request so you could revoke it directly after the call to filterChain.doFilter.
– Andrew White Mar 6 at 1:26.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.