fix: root role is not displayed
This commit is contained in:
parent
c4afb7586c
commit
b586d370f0
@ -26,7 +26,7 @@ export const ACLRolesCheckProvider = (props) => {
|
||||
},
|
||||
{
|
||||
onSuccess(data) {
|
||||
if (!data?.data?.allowConfigure) {
|
||||
if (!data?.data?.allowConfigure && !data?.data?.allowAll) {
|
||||
setDesignable(false);
|
||||
}
|
||||
},
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user