Answer the question
In order to leave comments, you need to log in
How to properly implement user authorization on SpringMVC+Hibernate?
You need to implement user authorization. For example, let's take two roles: user and admin.
User'u does not have access to functionality intended for admin'a. For example, some options (both user and admin can view the list of topics on the forum, but only admin can delete and edit other people's posts). I'm interested in how this is implemented in the spring/hibernate stack. I heard about Spring Security, but just now it prohibits some users from accessing the pages of the site (but this is only a special case of what is needed).
Specifically: authorization, prohibition and permission to view certain pages (depending on the rights), and, if possible, cutting down the functionality on the page (also depending on the rights).
I will be very grateful :)
Answer the question
In order to leave comments, you need to log in
docs.spring.io/spring-security/site/docs/3.0.x/ref...
@PreAuthorize("hasRole('ROLE_USER')") for method
docs.spring.io/spring-security/site/docs/ 3.0.x/ref...
sec:authorize access="hasRole('supervisor')"
sec:authorize url="/admin"
What are you missing?
It would be best to take a closer look at spring security, you can do anything there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question