Skip to content

Commit

Permalink
AUT-5: Reset Password doesn't work against latest versions of 2.6.x C…
Browse files Browse the repository at this point in the history
…ore and higher (again)
  • Loading branch information
mogoodrich committed Jan 14, 2025
1 parent 8e1d994 commit 55541db
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public void reset(@RequestParam(value = "username") String username,
try {
Context.addProxyPrivilege(PrivilegeConstants.GET_USERS);
Context.addProxyPrivilege(PrivilegeConstants.MANAGE_GLOBAL_PROPERTIES);
Context.addProxyPrivilege(PrivilegeConstants.GET_GLOBAL_PROPERTIES);
Context.addProxyPrivilege(PrivilegeConstants.EDIT_USER_PASSWORDS);
User user = userService.getUserByUsernameOrEmail(username);

Expand All @@ -54,6 +55,7 @@ public void reset(@RequestParam(value = "username") String username,
}
finally {
Context.removeProxyPrivilege(PrivilegeConstants.GET_USERS);
Context.removeProxyPrivilege(PrivilegeConstants.GET_GLOBAL_PROPERTIES);
Context.removeProxyPrivilege(PrivilegeConstants.MANAGE_GLOBAL_PROPERTIES);
Context.removeProxyPrivilege(PrivilegeConstants.EDIT_USER_PASSWORDS);
}
Expand Down

0 comments on commit 55541db

Please sign in to comment.