Commit 7e39a195318d96bb7deeca4b90e48bcb415ebc5e

Authored by YevhenBondarenko
Committed by Andrew Shvayka
1 parent a5656009

added customer authority for the firmware info methods

... ... @@ -73,7 +73,7 @@ public class FirmwareController extends BaseController {
73 73 }
74 74 }
75 75
76   - @PreAuthorize("hasAnyAuthority('TENANT_ADMIN')")
  76 + @PreAuthorize("hasAnyAuthority('TENANT_ADMIN', 'CUSTOMER_USER')")
77 77 @RequestMapping(value = "/firmware/info/{firmwareId}", method = RequestMethod.GET)
78 78 @ResponseBody
79 79 public FirmwareInfo getFirmwareInfoById(@PathVariable(FIRMWARE_ID) String strFirmwareId) throws ThingsboardException {
... ... @@ -158,7 +158,7 @@ public class FirmwareController extends BaseController {
158 158 }
159 159 }
160 160
161   - @PreAuthorize("hasAnyAuthority('TENANT_ADMIN')")
  161 + @PreAuthorize("hasAnyAuthority('TENANT_ADMIN', 'CUSTOMER_USER')")
162 162 @RequestMapping(value = "/firmwares", method = RequestMethod.GET)
163 163 @ResponseBody
164 164 public PageData<FirmwareInfo> getFirmwares(@RequestParam int pageSize,
... ... @@ -174,7 +174,7 @@ public class FirmwareController extends BaseController {
174 174 }
175 175 }
176 176
177   - @PreAuthorize("hasAnyAuthority('TENANT_ADMIN')")
  177 + @PreAuthorize("hasAnyAuthority('TENANT_ADMIN', 'CUSTOMER_USER')")
178 178 @RequestMapping(value = "/firmwares/{hasData}", method = RequestMethod.GET)
179 179 @ResponseBody
180 180 public PageData<FirmwareInfo> getFirmwares(@PathVariable("hasData") boolean hasData,
... ...