aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/api
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-11-13 09:19:16 -0800
committerAnton Tananaev <anton@traccar.org>2022-11-13 09:19:16 -0800
commit4ec9db613475066de3f46c24d4ee78fefcbb17df (patch)
treeb72eb8d7319ed3bc8403d7ceaa2787122ff71caf /src/main/java/org/traccar/api
parentd9d990b492896d7e42a503c002de7715f6d12a30 (diff)
downloadtrackermap-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')
-rw-r--r--src/main/java/org/traccar/api/security/PermissionsService.java2
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);