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
No related branches found
No related tags found
No related merge requests found
......@@ -315,8 +315,11 @@ public class UserController extends HttpServlet {
String messageKey = "";
if(userId > 0)
{
// Superuser can change username and password
if(user.isSuperUser())
// Superuser can change username and password for everyone
// 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();
auth.setUsername(username);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment