Skip to content

Commit 9da090d

Browse files
committed
Security: User: only return the list of users by role if an admin is asking - refs BT#21323
1 parent e555b88 commit 9da090d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main/inc/ajax/user_manager.ajax.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,10 @@
368368
}
369369
break;
370370
case 'user_by_role':
371-
api_block_anonymous_users(false);
371+
if (!api_is_platform_admin()) {
372+
api_not_allowed(false, null, 403);
373+
}
374+
372375

373376
$status = isset($_REQUEST['status']) ? (int) $_REQUEST['status'] : DRH;
374377
$active = isset($_REQUEST['active']) ? (int) $_REQUEST['active'] : null;

0 commit comments

Comments
 (0)