aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-09-12 06:01:02 -0700
committerAnton Tananaev <anton@traccar.org>2022-09-12 06:01:02 -0700
commit251829fb7583c50c0bac97bc47d41bdbf63cf6c1 (patch)
tree5d0bd621e67f8b93720e0cede02cf62648d71935 /src/main/java
parentb51526fdb177d3641e2780d5485586b487850874 (diff)
downloadtrackermap-server-251829fb7583c50c0bac97bc47d41bdbf63cf6c1.tar.gz
trackermap-server-251829fb7583c50c0bac97bc47d41bdbf63cf6c1.tar.bz2
trackermap-server-251829fb7583c50c0bac97bc47d41bdbf63cf6c1.zip
Fix manager permission check
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/api/security/PermissionsService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/api/security/PermissionsService.java b/src/main/java/org/traccar/api/security/PermissionsService.java
index a494c0257..ddfaaab94 100644
--- a/src/main/java/org/traccar/api/security/PermissionsService.java
+++ b/src/main/java/org/traccar/api/security/PermissionsService.java
@@ -170,8 +170,10 @@ public class PermissionsService {
|| before.getFixedEmail() != after.getFixedEmail()) {
if (userId == after.getId()) {
checkAdmin(userId);
- } else {
+ } else if (after.getId() > 0) {
checkUser(userId, after.getId());
+ } else {
+ checkManager(userId);
}
}
if (before.getFixedEmail() && !before.getEmail().equals(after.getEmail())) {