I'm having I think a design problem. I'm starting to need to implement method-based security to ensure my users don't try anything funny.
I have users "owning" a certain business object who can add other users "owning" children of this business object. What I'd like is to check that the user trying to create the new user is indeed the owner of the father of the object for which the new user will be added.
It's not very clear, but here is my question: is it a very bad design when it means that I need to query my database to check for things in a PermissionEvaluator ? And if not, is it even possible ? I can't seem to be able to inject Spring components (@Service beans for exemple) in a PermissionEvaluator used by a SpEL @PreAuthorize rule.