diff options
author | Anton Tananaev <anton@traccar.org> | 2023-09-21 21:05:32 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-09-21 21:05:44 -0700 |
commit | a8ea5f619cea8cc29289a91e3d4ac31a989759dd (patch) | |
tree | be8f1f466537d1498b1608269e3c7ac5612c89b0 /src/main | |
parent | a9c311855a495901935c2cb70252fa917fd88232 (diff) | |
download | trackermap-server-a8ea5f619cea8cc29289a91e3d4ac31a989759dd.tar.gz trackermap-server-a8ea5f619cea8cc29289a91e3d4ac31a989759dd.tar.bz2 trackermap-server-a8ea5f619cea8cc29289a91e3d4ac31a989759dd.zip |
Fix user deletion (fix #5183)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/api/resource/UserResource.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/api/resource/UserResource.java b/src/main/java/org/traccar/api/resource/UserResource.java index 587be014b..d73e8b6f5 100644 --- a/src/main/java/org/traccar/api/resource/UserResource.java +++ b/src/main/java/org/traccar/api/resource/UserResource.java @@ -122,7 +122,9 @@ public class UserResource extends BaseObjectResource<User> { @DELETE public Response remove(@PathParam("id") long id) throws StorageException { Response response = super.remove(id); - request.getSession().removeAttribute(SessionResource.USER_ID_KEY); + if (getUserId() == id) { + request.getSession().removeAttribute(SessionResource.USER_ID_KEY); + } return response; } |