Skip to content
Snippets Groups Projects
Commit 098817c9 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Bugfix: Allowing organization admins to edit password

parent a724ad4c
Branches
No related tags found
No related merge requests found
...@@ -315,8 +315,11 @@ public class UserController extends HttpServlet { ...@@ -315,8 +315,11 @@ public class UserController extends HttpServlet {
String messageKey = ""; String messageKey = "";
if(userId > 0) if(userId > 0)
{ {
// Superuser can change username and password // Superuser can change username and password for everyone
if(user.isSuperUser()) // Organization admin can change username and password for members of on organization
if(user.isSuperUser() ||
(user.isOrganizationAdmin() && viewUser.getOrganization_id().equals(user.getOrganization_id()))
)
{ {
UserAuthentication auth = viewUser.getPasswordAuthentication(); UserAuthentication auth = viewUser.getPasswordAuthentication();
auth.setUsername(username); auth.setUsername(username);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment