diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-08 15:49:20 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-08 15:49:20 +1300 |
commit | 7d075e394580b6618d2001f46928cb2465bad0ca (patch) | |
tree | 3dd8fb08117fdd6568385dd18a3a58db3afd3cb6 /src/org/traccar/api/resource | |
parent | 138c4ae9c215f2426ddb4b58cfbceb6a72e6259b (diff) | |
download | trackermap-server-7d075e394580b6618d2001f46928cb2465bad0ca.tar.gz trackermap-server-7d075e394580b6618d2001f46928cb2465bad0ca.tar.bz2 trackermap-server-7d075e394580b6618d2001f46928cb2465bad0ca.zip |
Add back-end readonly checks
Diffstat (limited to 'src/org/traccar/api/resource')
-rw-r--r-- | src/org/traccar/api/resource/UserResource.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/org/traccar/api/resource/UserResource.java b/src/org/traccar/api/resource/UserResource.java index 2d187fe9d..7790dc908 100644 --- a/src/org/traccar/api/resource/UserResource.java +++ b/src/org/traccar/api/resource/UserResource.java @@ -64,6 +64,9 @@ public class UserResource extends BaseResource { Context.getPermissionsManager().checkAdmin(getUserId()); } else { Context.getPermissionsManager().checkUser(getUserId(), entity.getId()); + if (!entity.getReadonly()) { + Context.getPermissionsManager().checkReadonly(entity.getId()); + } } Context.getPermissionsManager().updateUser(entity); if (Context.getNotificationManager() != null) { |