We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b23261d commit a661045Copy full SHA for a661045
bennu-core/src/main/java/org/fenixedu/bennu/core/api/UserResource.java
@@ -40,9 +40,10 @@ public class UserResource extends BennuRestResource {
40
public JsonElement findUser(@QueryParam("query") String query,
41
@QueryParam("includeInactive") @DefaultValue("false") Boolean includeInactive,
42
@QueryParam("maxHits") @DefaultValue("20") Integer maxHits) {
43
- if (query == null || Authenticate.getUser() == null) {
+ if (query == null) {
44
throw new WebApplicationException(Status.BAD_REQUEST);
45
}
46
+ accessControl(Group.managers());
47
Stream<User> results =
48
Stream.concat(Stream.of(User.findByUsername(query)),
49
UserProfile.searchByName(query, Integer.MAX_VALUE).map(UserProfile::getUser)).filter(Objects::nonNull)
0 commit comments