Removed usage of MvcContext#uri
parent
c5c657c449
commit
d4b27e04c9
|
|
@ -48,8 +48,8 @@ import javax.ws.rs.PathParam;
|
||||||
import javax.ws.rs.QueryParam;
|
import javax.ws.rs.QueryParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Controller for the user details view and the {@code GET} requests to the
|
* Controller for the user details view and the {@code GET} requests to the user
|
||||||
* user edit form.
|
* edit form.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -223,10 +223,7 @@ public class UsersController {
|
||||||
final User user = result.get();
|
final User user = result.get();
|
||||||
user.setBanned(true);
|
user.setBanned(true);
|
||||||
userRepository.save(user);
|
userRepository.save(user);
|
||||||
return String.format(
|
return "redirect:users-groups-roles/users";
|
||||||
//"redirect:%s", mvc.uri("UsersController#getUsers")
|
|
||||||
"redirect:users-groups-roles/users"
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
userDetailsModel.addMessage(
|
userDetailsModel.addMessage(
|
||||||
new Message(
|
new Message(
|
||||||
|
|
@ -326,14 +323,9 @@ public class UsersController {
|
||||||
) {
|
) {
|
||||||
if (!confirmed) {
|
if (!confirmed) {
|
||||||
return String.format(
|
return String.format(
|
||||||
"redirect:%s",
|
"redirect:%s/users-groups-roles/users/%s",
|
||||||
mvc.uri(
|
mvc.getBasePath(),
|
||||||
String.format(
|
userIdentifierParam
|
||||||
"UsersController#getUserDetails",
|
|
||||||
"{ userIdentifier: %s}",
|
|
||||||
userIdentifierParam
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -361,27 +353,17 @@ public class UsersController {
|
||||||
final User user = result.get();
|
final User user = result.get();
|
||||||
if (user.getEmailAddresses().size() <= emailId) {
|
if (user.getEmailAddresses().size() <= emailId) {
|
||||||
return String.format(
|
return String.format(
|
||||||
"redirect:%s",
|
"redirect:%s/users-groups-roles/users/%s",
|
||||||
mvc.uri(
|
mvc.getBasePath(),
|
||||||
String.format(
|
userIdentifierParam
|
||||||
"UsersController#getUserDetails",
|
|
||||||
"{ userIdentifier: %s}",
|
|
||||||
userIdentifierParam
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
user.getEmailAddresses().remove(emailId);
|
user.getEmailAddresses().remove(emailId);
|
||||||
userRepository.save(user);
|
userRepository.save(user);
|
||||||
return String.format(
|
return String.format(
|
||||||
"redirect:%s",
|
"redirect:%s/users-groups-roles/users/%s",
|
||||||
mvc.uri(
|
mvc.getBasePath(),
|
||||||
String.format(
|
userIdentifierParam
|
||||||
"UsersController#getUserDetails",
|
|
||||||
"{ userIdentifier: %s}",
|
|
||||||
userIdentifierParam
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
userDetailsModel.addMessage(
|
userDetailsModel.addMessage(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue