0

I am trying to check some permissions when a user access to a page and redirect him to an error page (controller specific) when I hasn't got good rights. I know Spring Security and Pre/PostAuthorize annotations but my application do not need any login form even less UserService.

My permissions are defined by injecting an user context (combinating some data create user rights).

So my idea is to annotate Spring Controller method with an "Permission" annotation and create an annotation processor who verify user user rights on request (and redirect him if have no rights). Is it a good idea and how to declare this annotation processor with Spring MVC ?

4

0 回答 0