Skip to content
Permalink
Browse files
fix(users): fix bug adding user to group or project (DEV-184) (#1925)
* fix typos in error message

* fix bug
  • Loading branch information
irinaschubert committed Nov 1, 2021
1 parent 7752a36 commit a24a320331e47fb12474bd3345d4e909544019e5
Showing with 6 additions and 4 deletions.
  1. +6 −4 webapi/src/main/scala/org/knora/webapi/responders/admin/UsersResponderADM.scala
@@ -1556,10 +1556,12 @@ class UsersResponderADM(responderData: ResponderData) extends Responder(responde
}

_ = if (userUpdatePayload.projects.isDefined) {
if (updatedUserADM.projects.map(_.id) != userUpdatePayload.projects.get)

if (updatedUserADM.projects.map(_.id).sorted != userUpdatePayload.projects.get.sorted) {
throw UpdateNotPerformedException(
"User's 'project' memberships where not updated. Please report this as a possible bug."
"User's 'project' memberships were not updated. Please report this as a possible bug."
)
}
}

_ = if (userUpdatePayload.systemAdmin.isDefined) {
@@ -1570,9 +1572,9 @@ class UsersResponderADM(responderData: ResponderData) extends Responder(responde
}

_ = if (userUpdatePayload.groups.isDefined) {
if (updatedUserADM.groups.map(_.id) != userUpdatePayload.groups.get)
if (updatedUserADM.groups.map(_.id).sorted != userUpdatePayload.groups.get.sorted)
throw UpdateNotPerformedException(
"User's 'group' memberships where not updated. Please report this as a possible bug."
"User's 'group' memberships were not updated. Please report this as a possible bug."
)
}

0 comments on commit a24a320

Please sign in to comment.