diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/api/resource/DeviceResource.java | 4 |
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")))); |