From d0335d23fea117731cf15dac31cd259e9c026674 Mon Sep 17 00:00:00 2001 From: Pedro Igor Date: Fri, 16 Aug 2024 10:53:55 -0300 Subject: [PATCH] Do not query organizations when selecting a user if organization is disabled Signed-off-by: Pedro Igor --- js/apps/admin-ui/src/user/EditUser.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/apps/admin-ui/src/user/EditUser.tsx b/js/apps/admin-ui/src/user/EditUser.tsx index ed90845ae1..bc48531e25 100644 --- a/js/apps/admin-ui/src/user/EditUser.tsx +++ b/js/apps/admin-ui/src/user/EditUser.tsx @@ -123,7 +123,9 @@ export default function EditUser() { adminClient.attackDetection.findOne({ id: id! }), adminClient.users.getUnmanagedAttributes({ id: id! }), adminClient.users.getProfile({ realm: realmName }), - adminClient.organizations.find({ first: 0, max: 1 }), + showOrganizations + ? adminClient.organizations.find({ first: 0, max: 1 }) + : [], ]), ([ userData,