1
1
11oooooooo112016-04-02 19:00:33
Java
11oooooooo11, 2016-04-02 19:00:33

spring security. How, depending on the user's role, to execute different methods when requesting an address?

There is a request for an address. It is necessary, depending on the user's rights, to perform different methods.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanisav, 2016-04-07
@NCNecros

Try calling a method in the controller
And depending on what is there, perform different actions

1
11ooooooooo11, 2016-04-10
@11oooooooooo11

or
if(SecurityContextHolderAwareRequestWrapper.isUserInRole("admin")){
//Some actions
}
else {
//Some actions
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question