aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2023-03-21 08:50:06 -0700
committerGitHub <noreply@github.com>2023-03-21 08:50:06 -0700
commit376df800e0f96b5237640420f7323a5980c0852b (patch)
tree8ee6a3217d56168876f3459e79965543ea00ed31
parentffe4c83b226308932e8a1c1388104c9070a3184b (diff)
parent2d20fbd1740f302af5a1e7522e728c0939a323a0 (diff)
downloadtrackermap-server-376df800e0f96b5237640420f7323a5980c0852b.tar.gz
trackermap-server-376df800e0f96b5237640420f7323a5980c0852b.tar.bz2
trackermap-server-376df800e0f96b5237640420f7323a5980c0852b.zip
Merge pull request #5051 from wkhaksar/add-session-retreival-access-to-managers
Manager login as other users
-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());