From 4ec9db613475066de3f46c24d4ee78fefcbb17df Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 13 Nov 2022 09:19:16 -0800 Subject: Fix manager permission (fix #4982) --- src/main/java/org/traccar/api/security/PermissionsService.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/org/traccar') 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); -- cgit v1.2.3