Repository: DefGuard/defguard (language: rust)

Issue:
Admin can only manage other admins devices if the option to disable device management by users is enabled
![obraz](https://github.com/user-attachments/assets/80e014de-8492-4ef6-8e0f-76bc9e73ae85)

Different user without an admin status:
![obraz](https://github.com/user-attachments/assets/331d0642-5ad9-4f81-b697-550280753a4c)

Different admin:
![obraz](https://github.com/user-attachments/assets/8615ef94-4358-4cde-9b60-dde7011c314b)



Discussion / hints:

Fix patch:
diff --git a/web/src/pages/users/UserProfile/UserDevices/UserDevices.tsx b/web/src/pages/users/UserProfile/UserDevices/UserDevices.tsx
index 9280d473e..1ef8fd984 100644
--- a/web/src/pages/users/UserProfile/UserDevices/UserDevices.tsx
+++ b/web/src/pages/users/UserProfile/UserDevices/UserDevices.tsx
@@ -4,8 +4,8 @@ import Skeleton from 'react-loading-skeleton';
 import { useNavigate } from 'react-router';
 
 import { useI18nContext } from '../../../../i18n/i18n-react';
-import { isUserAdmin } from '../../../../shared/helpers/isUserAdmin';
 import { useAppStore } from '../../../../shared/hooks/store/useAppStore';
+import { useAuthStore } from '../../../../shared/hooks/store/useAuthStore';
 import { useUserProfileStore } from '../../../../shared/hooks/store/useUserProfileStore';
 import { useAddDevicePageStore } from '../../../addDevice/hooks/useAddDevicePageStore';
 import { AddComponentBox } from '../../shared/components/AddComponentBox/AddComponentBox';
@@ -21,9 +21,10 @@ export const UserDevices = () => {
   const { LL } = useI18nContext();
   const userProfile = useUserProfileStore((state) => state.userProfile);
   const initAddDevice = useAddDevicePageStore((state) => state.init);
+  const isAdmin = useAuthStore((state) => state.isAdmin);
   const canManageDevices = !!(
     userProfile &&
-    (!settings?.admin_device_management || isUserAdmin(userProfile.user))
+    (!settings?.admin_device_management || isAdmin)
   );
 
   return (


Test patch: