Skip to content

Commit

Permalink
FKS-596 #comment api only returns users with status eq ACTIV #done
Browse files Browse the repository at this point in the history
  • Loading branch information
Erling Jahr committed Jan 8, 2024
1 parent 2ceec11 commit 8e41934
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/no/fintlabs/user/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public List<SimpleUser> getSimpleUsers(
users = userRepository.findUsersByNameType(search, userType);
return users
.stream()
.filter(user -> user.getStatus().equals("ACTIV"))
.map(User::toSimpleUser)
.toList();
}
Expand All @@ -106,6 +107,7 @@ public List<SimpleUser> getSimpleUsers(
users = userRepository.findUsersByNameOrg(search, orgUnits);
return users
.stream()
.filter(user -> user.getStatus().equals("ACTIV"))
.map(User::toSimpleUser)
.toList();
}
Expand All @@ -114,6 +116,7 @@ public List<SimpleUser> getSimpleUsers(
users = userRepository.findUsersByName(search);
return users
.stream()
.filter(user -> user.getStatus().equals("ACTIV"))
.map(User::toSimpleUser)
.toList();
}
Expand All @@ -122,6 +125,7 @@ public List<SimpleUser> getSimpleUsers(
users = userRepository.findUsersByNameOrgType(search, orgUnits, userType);
return users
.stream()
.filter(user -> user.getStatus().equals("ACTIV"))
.map(User::toSimpleUser)
.toList();
}
Expand Down

0 comments on commit 8e41934

Please sign in to comment.