aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwkhaksar <31837615+wkhaksar@users.noreply.github.com>2023-03-21 15:16:49 +0000
committerwkhaksar <31837615+wkhaksar@users.noreply.github.com>2023-03-21 15:16:49 +0000
commit2d20fbd1740f302af5a1e7522e728c0939a323a0 (patch)
tree8ee6a3217d56168876f3459e79965543ea00ed31
parentffe4c83b226308932e8a1c1388104c9070a3184b (diff)
downloadtrackermap-server-2d20fbd1740f302af5a1e7522e728c0939a323a0.tar.gz
trackermap-server-2d20fbd1740f302af5a1e7522e728c0939a323a0.tar.bz2
trackermap-server-2d20fbd1740f302af5a1e7522e728c0939a323a0.zip
changed-session-retreival-permission-to-manager
-rw-r--r--src/main/java/org/traccar/api/resource/SessionResource.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/api/resource/SessionResource.java b/src/main/java/org/traccar/api/resource/SessionResource.java
index 7025d5fa7..ff84c135f 100644
--- a/src/main/java/org/traccar/api/resource/SessionResource.java
+++ b/src/main/java/org/traccar/api/resource/SessionResource.java
@@ -123,7 +123,7 @@ public class SessionResource extends BaseResource {
@Path("{id}")
@GET
public User get(@PathParam("id") long userId) throws StorageException {
- permissionsService.checkAdmin(getUserId());
+ permissionsService.checkUser(getUserId(), userId);
User user = storage.getObject(User.class, new Request(
new Columns.All(), new Condition.Equals("id", userId)));
request.getSession().setAttribute(USER_ID_KEY, user.getId());