@RequestMapping(value = "/users", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize("hasAuthority('ADMIN')")
@Audit
public synchronized RestResponse<List<UserDTO>> grantAccessToUsers(@PathVariable String orchestratorId, @PathVariable String locationId,
@PathVariable String resourceId, @RequestBody String[] userNames) {
<BUG>LocationResourceTemplate resourceTemplate = locationResourceService.getOrFail(resourceId);
hasAuthorizationOrFailed(resourceTemplate, Subject.USER, userNames);

resourcePermissionService.grantPermission(resourceTemplate, Subject.USER, userNames);</BUG>
List<UserDTO> users = LocationSecurityController.convertListUserToListUserDTO(resourcePermissionService.getAuthorizedUsers(resourceTemplate));

@RequestMapping(value = "/users", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize("hasAuthority('ADMIN')")
@Audit
public synchronized RestResponse<List<UserDTO>> grantAccessToUsers(@PathVariable String orchestratorId, @PathVariable String locationId,
@PathVariable String resourceId, @RequestBody String[] userNames) {
Location location = locationService.getLocation(orchestratorId, locationId);
hasAuthorizationOrFailed(location, Subject.USER, userNames);
LocationResourceTemplate resourceTemplate = locationResourceService.getOrFail(resourceId);
resourcePermissionService.grantPermission(resourceTemplate, Subject.USER, userNames);
List<UserDTO> users = LocationSecurityController.convertListUserToListUserDTO(resourcePermissionService.getAuthorizedUsers(resourceTemplate));
