aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/PermissionsManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-10-09 15:24:12 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-10-09 15:24:12 +1300
commit787848118108f458c9d209ad362ce8377d38f8dc (patch)
tree2a897402e2e046ff42e7a0ba655d7c9c58ee3625 /src/org/traccar/database/PermissionsManager.java
parentbc39a5aaa85813cb003405dd67387454011da450 (diff)
downloadtrackermap-server-787848118108f458c9d209ad362ce8377d38f8dc.tar.gz
trackermap-server-787848118108f458c9d209ad362ce8377d38f8dc.tar.bz2
trackermap-server-787848118108f458c9d209ad362ce8377d38f8dc.zip
Admin users are never readonly
Diffstat (limited to 'src/org/traccar/database/PermissionsManager.java')
-rw-r--r--src/org/traccar/database/PermissionsManager.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java
index 1732bbb11..b9707ab7d 100644
--- a/src/org/traccar/database/PermissionsManager.java
+++ b/src/org/traccar/database/PermissionsManager.java
@@ -145,7 +145,7 @@ public class PermissionsManager {
}
public void checkReadonly(long userId) throws SecurityException {
- if (server.getReadonly() || isReadonly(userId)) {
+ if (!isAdmin(userId) && (server.getReadonly() || isReadonly(userId))) {
throw new SecurityException("User is readonly");
}
}