Skip to content

Commit

Permalink
PIN-3515 Resolved PR issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nttdata-rtorsoli committed Oct 25, 2023
1 parent b3bec97 commit 859ac61
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ final case class ClientApiServiceImpl(
client <- authorizationManagementService
.getClient(clientUuid)
.ensureOr(client => OrganizationNotAllowedOnClient(clientId, client.consumerId))(_.consumerId == requesterOrgId)
_ <- getSecurityUser(selfcareId, requesterUserId, userUUID)
_ <- assertSecurityUser(selfcareId, requesterUserId, userUUID)
updatedClient <- client.users
.find(_ === userUUID)
.fold(authorizationManagementService.addUser(clientUuid, userUUID)(contexts))(_ =>
Expand Down Expand Up @@ -254,7 +254,7 @@ final case class ClientApiServiceImpl(
.getClient(clientUuid)
.ensureOr(client => OrganizationNotAllowedOnClient(clientId, client.consumerId))(_.consumerId == requesterOrgId)
_ <- client.users.find(_ == requesterUserId).toFuture(UserNotFound(selfcareId, requesterUserId))
user <- getSecurityUser(selfcareId, requesterOrgId, requesterUserId)
user <- assertSecurityUser(selfcareId, requesterOrgId, requesterUserId)
seeds = keysSeeds.map(_.toDependency(requesterUserId, dateTimeSupplier.get()))
keysResponse <- authorizationManagementService.createKeys(clientUuid, seeds)(contexts)
} yield Keys(keysResponse.keys.map(_.toApi))
Expand Down Expand Up @@ -420,7 +420,7 @@ final case class ClientApiServiceImpl(
}
}

private[this] def getSecurityUser(
private[this] def assertSecurityUser(
selfcareId: UUID,
requesterUserId: UUID,
userId: UUID,
Expand Down

0 comments on commit 859ac61

Please sign in to comment.