aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-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);