aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-01-21 08:17:47 -0800
committerAnton Tananaev <anton@traccar.org>2024-01-21 08:17:47 -0800
commitd4d66200bf1de4a1932765690ffb9eedd58f0900 (patch)
tree70dbd0b8af34205e9189351e8f0ec143e3df4baa /src/main/java
parent8d2accad7071321c65055d8fb9e11d2a6a586b02 (diff)
downloadtrackermap-server-d4d66200bf1de4a1932765690ffb9eedd58f0900.tar.gz
trackermap-server-d4d66200bf1de4a1932765690ffb9eedd58f0900.tar.bz2
trackermap-server-d4d66200bf1de4a1932765690ffb9eedd58f0900.zip
Improve sharing permissions
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/api/resource/DeviceResource.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/api/resource/DeviceResource.java b/src/main/java/org/traccar/api/resource/DeviceResource.java
index c3ced9b84..8e634232a 100644
--- a/src/main/java/org/traccar/api/resource/DeviceResource.java
+++ b/src/main/java/org/traccar/api/resource/DeviceResource.java
@@ -228,8 +228,8 @@ public class DeviceResource extends BaseObjectResource<Device> {
share.setExpirationTime(expiration);
share.setTemporary(true);
share.setReadonly(true);
- share.setLimitCommands(!config.getBoolean(Keys.WEB_SHARE_DEVICE_COMMANDS));
- share.setDisableReports(!config.getBoolean(Keys.WEB_SHARE_DEVICE_REPORTS));
+ share.setLimitCommands(user.getLimitCommands() || !config.getBoolean(Keys.WEB_SHARE_DEVICE_COMMANDS));
+ share.setDisableReports(user.getDisableReports() || !config.getBoolean(Keys.WEB_SHARE_DEVICE_REPORTS));
share.setId(storage.addObject(share, new Request(new Columns.Exclude("id"))));