aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/api/security
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-07-18 16:52:31 -0700
committerAnton Tananaev <anton@traccar.org>2022-07-18 16:52:31 -0700
commit8bc3c8c7d2c762ec00bfb1960dcd02171b7312a6 (patch)
tree5f26a6e5f252803ccde9eaffe42b7d5a19990db2 /src/main/java/org/traccar/api/security
parentcf2583cec5f6b9c92730bdcdc5805944ff0bfa59 (diff)
downloadtrackermap-server-8bc3c8c7d2c762ec00bfb1960dcd02171b7312a6.tar.gz
trackermap-server-8bc3c8c7d2c762ec00bfb1960dcd02171b7312a6.tar.bz2
trackermap-server-8bc3c8c7d2c762ec00bfb1960dcd02171b7312a6.zip
Disable email change (fix #3878)
Diffstat (limited to 'src/main/java/org/traccar/api/security')
-rw-r--r--src/main/java/org/traccar/api/security/PermissionsService.java6
1 files changed, 5 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 a3e7a182f..a494c0257 100644
--- a/src/main/java/org/traccar/api/security/PermissionsService.java
+++ b/src/main/java/org/traccar/api/security/PermissionsService.java
@@ -166,13 +166,17 @@ public class PermissionsService {
|| before.getDeviceReadonly() != after.getDeviceReadonly()
|| before.getDisabled() != after.getDisabled()
|| before.getLimitCommands() != after.getLimitCommands()
- || before.getDisableReports() != after.getDisableReports()) {
+ || before.getDisableReports() != after.getDisableReports()
+ || before.getFixedEmail() != after.getFixedEmail()) {
if (userId == after.getId()) {
checkAdmin(userId);
} else {
checkUser(userId, after.getId());
}
}
+ if (before.getFixedEmail() && !before.getEmail().equals(after.getEmail())) {
+ checkAdmin(userId);
+ }
}
public <T extends BaseModel> void checkPermission(