Change exception ...

This commit is contained in:
Paulo Gustavo Veiga 2013-03-19 22:41:43 -03:00
parent c2e74cb2d4
commit 617abd9d90
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ public class AdminController extends BaseController {
userService.changePassword(user);
}
@RequestMapping(method = RequestMethod.DELETE, value = "admin/users/{id}")
@RequestMapping(method = RequestMethod.DELETE, value = "admin/users/{id}",consumes = {"text/plain"})
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void getUserByEmail(@PathVariable long id) throws WiseMappingException {
final User user = userService.getUserBy(id);

View File

@ -61,7 +61,7 @@ public class UserDetailsService
final User result;
if (dbUser != null) {
if (!token.getIdentityUrl().equals(dbUser.getAuthenticatorUri())) {
throw new IllegalStateException("Identity url for this user can not change:" + token.getIdentityUrl());
throw new UsernameNotFoundException("Identity url for this user can not change:" + token.getIdentityUrl());
}
result = dbUser;
} else {