aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/api/resource/UserResource.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/api/resource/UserResource.java b/src/main/java/org/traccar/api/resource/UserResource.java
index 1bb399437..dd71de4c6 100644
--- a/src/main/java/org/traccar/api/resource/UserResource.java
+++ b/src/main/java/org/traccar/api/resource/UserResource.java
@@ -54,8 +54,8 @@ public class UserResource extends BaseObjectResource<User> {
@GET
public Collection<User> get(@QueryParam("userId") long userId) throws StorageException {
- permissionsService.checkUser(getUserId(), userId);
if (userId > 0) {
+ permissionsService.checkUser(getUserId(), userId);
return storage.getObjects(baseClass, new Request(
new Columns.All(),
new Condition.Permission(User.class, userId, ManagedUser.class).excludeGroups()));