diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-27 17:27:10 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-27 17:27:10 -0700 |
commit | 8ed7d6cd19f221c40e9994c0469009ff9c0e46b1 (patch) | |
tree | bfca6ce96520d2db4bd654b4977f82a37fbff5c6 /src/main/java/org/traccar/api/SimpleObjectResource.java | |
parent | 79b5d08f45e8be4ff7d0072cd91fed39d5afe117 (diff) | |
download | trackermap-server-8ed7d6cd19f221c40e9994c0469009ff9c0e46b1.tar.gz trackermap-server-8ed7d6cd19f221c40e9994c0469009ff9c0e46b1.tar.bz2 trackermap-server-8ed7d6cd19f221c40e9994c0469009ff9c0e46b1.zip |
Fix several manager issues
Diffstat (limited to 'src/main/java/org/traccar/api/SimpleObjectResource.java')
-rw-r--r-- | src/main/java/org/traccar/api/SimpleObjectResource.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/api/SimpleObjectResource.java b/src/main/java/org/traccar/api/SimpleObjectResource.java index c61101077..15a496c5f 100644 --- a/src/main/java/org/traccar/api/SimpleObjectResource.java +++ b/src/main/java/org/traccar/api/SimpleObjectResource.java @@ -41,7 +41,9 @@ public class SimpleObjectResource<T extends BaseModel> extends BaseObjectResourc var conditions = new LinkedList<Condition>(); if (all) { - permissionsService.checkAdmin(getUserId()); + if (!permissionsService.isAdmin(getUserId())) { + conditions.add(new Condition.Permission(User.class, getUserId(), baseClass)); + } } else { if (userId == 0) { userId = getUserId(); |