Skip to content
Snippets Groups Projects
Commit e8aa7d87 authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Merge branch '2.1' into 2.2

parents be8d4543 9b75dad7
No related merge requests found
......@@ -97,7 +97,7 @@ public class UserController extends AbstractController {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
}
@RequestMapping(value = { "/{username}" }, method = RequestMethod.DELETE)
@RequestMapping(value = { "/{username}/" }, method = RequestMethod.DELETE)
public void activate(
@PathVariable final String username,
final HttpServletRequest request,
......
......@@ -424,7 +424,7 @@ public class UserService implements IUserService {
public DbUser deleteDbUser(String username) {
User user = getCurrentUser();
if (!user.getUsername().equals(username)
&& SecurityContextHolder.getContext().getAuthentication().getAuthorities()
&& !SecurityContextHolder.getContext().getAuthentication().getAuthorities()
.contains(new SimpleGrantedAuthority("ROLE_ADMIN"))) {
throw new UnauthorizedException();
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment