diff --git a/packages/client/src/acl/ACLProvider.tsx b/packages/client/src/acl/ACLProvider.tsx index aba3d634e..5a59407b7 100644 --- a/packages/client/src/acl/ACLProvider.tsx +++ b/packages/client/src/acl/ACLProvider.tsx @@ -26,7 +26,7 @@ export const ACLRolesCheckProvider = (props) => { }, { onSuccess(data) { - if (!data?.data?.allowConfigure) { + if (!data?.data?.allowConfigure && !data?.data?.allowAll) { setDesignable(false); } }, diff --git a/packages/client/src/user/SwitchRole.tsx b/packages/client/src/user/SwitchRole.tsx index 8d851e998..e7d4ed1da 100644 --- a/packages/client/src/user/SwitchRole.tsx +++ b/packages/client/src/user/SwitchRole.tsx @@ -8,7 +8,12 @@ import { useCurrentUserContext } from './CurrentUserProvider'; const useCurrentRoles = () => { const { data } = useCurrentUserContext(); return [ - ...(data?.data?.roles || []), + ...(data?.data?.roles || []).map(item => { + return { + title: item.title, + name: item.name, + } + }), { title: 'Anonymous', name: 'anonymous',