Reputation: 4076
I need to manage the access too different jsp pages based on the role of the user that accesses it.
So let's say that I wanna access adminPage. If this method is accesed having admin role then i should be able to return the page, otherwise not.
So I have this controller:
@Controller
public class SpringSecurityController
inside this controller I have this method which return me the requested page:
@RequestMapping("admin") //this does not work
public String getAdminPage()
{
return "adminPage";
}
The trick is that i want to be capable to set this level of authorization as annotation to the getAdminPage() method in the given controller without any web xml settings or any other xml settings involved.
Help is much needed!
Upvotes: 0
Views: 209