diff options
author | Anton Tananaev <anton@traccar.org> | 2022-06-16 07:45:19 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-06-16 07:45:19 -0700 |
commit | e74c64f27dc30473d9ef866c5c52e3dd6bee2fc3 (patch) | |
tree | 00ff1a6d2debb857aef0c736d3a68b2607b45ab9 /src/main/java/org/traccar/api/resource | |
parent | cc342a9ba371b0dca8d87ca9e74c5907ccb58bc6 (diff) | |
download | trackermap-server-e74c64f27dc30473d9ef866c5c52e3dd6bee2fc3.tar.gz trackermap-server-e74c64f27dc30473d9ef866c5c52e3dd6bee2fc3.tar.bz2 trackermap-server-e74c64f27dc30473d9ef866c5c52e3dd6bee2fc3.zip |
Refactor device permissions check
Diffstat (limited to 'src/main/java/org/traccar/api/resource')
-rw-r--r-- | src/main/java/org/traccar/api/resource/EventResource.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/api/resource/EventResource.java b/src/main/java/org/traccar/api/resource/EventResource.java index eb373946a..3870e9af9 100644 --- a/src/main/java/org/traccar/api/resource/EventResource.java +++ b/src/main/java/org/traccar/api/resource/EventResource.java @@ -15,8 +15,8 @@ */ package org.traccar.api.resource; -import org.traccar.Context; import org.traccar.api.BaseResource; +import org.traccar.model.Device; import org.traccar.model.Event; import org.traccar.storage.StorageException; import org.traccar.storage.query.Columns; @@ -45,7 +45,7 @@ public class EventResource extends BaseResource { if (event == null) { throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND).build()); } - Context.getPermissionsManager().checkDevice(getUserId(), event.getDeviceId()); + permissionsService.checkPermission(Device.class, getUserId(), event.getDeviceId()); return event; } |