Fix missing QueryClient (#47)

This commit is contained in:
Borislav Pantaleev
2024-09-27 00:42:09 +03:00
committed by GitHub
parent b7f8e03894
commit 02bee92806
3 changed files with 42 additions and 32 deletions

View File

@@ -1,10 +1,11 @@
import { Identifier } from "ra-core";
/**
* Check if a user is managed by an application service
* @param id The user ID to check
* @returns Whether the user is managed by an application service
*/
export const isASManaged = (id: string): boolean => {
export const isASManaged = (id: string | Identifier): boolean => {
const managedUsersString = localStorage.getItem("as_managed_users") || '';
try {
const asManagedUsers = JSON.parse(managedUsersString).map(regex => new RegExp(regex));