diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-09 15:24:12 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-09 15:24:12 +1300 |
commit | 787848118108f458c9d209ad362ce8377d38f8dc (patch) | |
tree | 2a897402e2e046ff42e7a0ba655d7c9c58ee3625 /src/org/traccar/database/PermissionsManager.java | |
parent | bc39a5aaa85813cb003405dd67387454011da450 (diff) | |
download | trackermap-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.java | 2 |
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"); } } |