diff options
author | Anton Tananaev <anton@traccar.org> | 2022-11-13 09:19:16 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-11-13 09:19:16 -0800 |
commit | 4ec9db613475066de3f46c24d4ee78fefcbb17df (patch) | |
tree | b72eb8d7319ed3bc8403d7ceaa2787122ff71caf /src/main/java/org/traccar/api/security | |
parent | d9d990b492896d7e42a503c002de7715f6d12a30 (diff) | |
download | trackermap-server-4ec9db613475066de3f46c24d4ee78fefcbb17df.tar.gz trackermap-server-4ec9db613475066de3f46c24d4ee78fefcbb17df.tar.bz2 trackermap-server-4ec9db613475066de3f46c24d4ee78fefcbb17df.zip |
Fix manager permission (fix #4982)
Diffstat (limited to 'src/main/java/org/traccar/api/security')
-rw-r--r-- | src/main/java/org/traccar/api/security/PermissionsService.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/api/security/PermissionsService.java b/src/main/java/org/traccar/api/security/PermissionsService.java index 71acb3d48..37bb6fd72 100644 --- a/src/main/java/org/traccar/api/security/PermissionsService.java +++ b/src/main/java/org/traccar/api/security/PermissionsService.java @@ -34,6 +34,7 @@ import org.traccar.storage.query.Condition; import org.traccar.storage.query.Request; import javax.inject.Inject; +import java.util.Objects; @RequestScoped public class PermissionsService { @@ -158,6 +159,7 @@ public class PermissionsService { } User user = getUser(userId); if (user != null && user.getExpirationTime() != null + && !Objects.equals(before.getExpirationTime(), after.getExpirationTime()) && (after.getExpirationTime() == null || user.getExpirationTime().compareTo(after.getExpirationTime()) < 0)) { checkAdmin(userId); |