aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/api')
-rw-r--r--src/main/java/org/traccar/api/ExtendedObjectResource.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/api/ExtendedObjectResource.java b/src/main/java/org/traccar/api/ExtendedObjectResource.java
index 40d679ded..1c306630c 100644
--- a/src/main/java/org/traccar/api/ExtendedObjectResource.java
+++ b/src/main/java/org/traccar/api/ExtendedObjectResource.java
@@ -56,11 +56,11 @@ public class ExtendedObjectResource<T extends BaseModel> extends BaseObjectResou
if (groupId > 0) {
permissionsService.checkPermission(Group.class, getUserId(), groupId);
- conditions.add(new Condition.Permission(Group.class, groupId, baseClass));
+ conditions.add(new Condition.Permission(Group.class, groupId, baseClass).excludeGroups());
}
if (deviceId > 0) {
permissionsService.checkPermission(Device.class, getUserId(), deviceId);
- conditions.add(new Condition.Permission(Device.class, deviceId, baseClass));
+ conditions.add(new Condition.Permission(Device.class, deviceId, baseClass).excludeGroups());
}
return storage.getObjects(baseClass, new Request(new Columns.All(), Condition.merge(conditions)));