Browse Source

fixed UserController getUsersByIds method

pull/14355/head
dashevchenko 6 months ago
parent
commit
287e6b950e
  1. 2
      application/src/main/java/org/thingsboard/server/controller/UserController.java
  2. 2
      application/src/test/java/org/thingsboard/server/controller/UserControllerTest.java

2
application/src/main/java/org/thingsboard/server/controller/UserController.java

@ -599,7 +599,7 @@ public class UserController extends BaseController {
@ApiOperation(value = "Get Users By Ids (getUsersByIds)",
notes = "Requested users must be owned by tenant or assigned to customer which user is performing the request. ")
@PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN', 'CUSTOMER_USER')")
@PreAuthorize("hasAnyAuthority('TENANT_ADMIN', 'CUSTOMER_USER')")
@GetMapping(value = "/users", params = {"userIds"})
public List<User> getUsersByIds(
@Parameter(description = "A list of user ids, separated by comma ','", array = @ArraySchema(schema = @Schema(type = "string")), required = true)

2
application/src/test/java/org/thingsboard/server/controller/UserControllerTest.java

@ -269,7 +269,7 @@ public class UserControllerTest extends AbstractControllerTest {
@Test
public void testFindUsersByIds() throws Exception {
loginSysAdmin();
loginTenantAdmin();
List<User> savedUsers = new ArrayList<>();
for (int i = 0; i < 10; i++) {
User user = createTenantAdminUser();

Loading…
Cancel
Save