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) {
|
onSuccess(data) {
|
||||||
if (!data?.data?.allowConfigure) {
|
if (!data?.data?.allowConfigure && !data?.data?.allowAll) {
|
||||||
setDesignable(false);
|
setDesignable(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,12 @@ import { useCurrentUserContext } from './CurrentUserProvider';
|
|||||||
const useCurrentRoles = () => {
|
const useCurrentRoles = () => {
|
||||||
const { data } = useCurrentUserContext();
|
const { data } = useCurrentUserContext();
|
||||||
return [
|
return [
|
||||||
...(data?.data?.roles || []),
|
...(data?.data?.roles || []).map(item => {
|
||||||
|
return {
|
||||||
|
title: item.title,
|
||||||
|
name: item.name,
|
||||||
|
}
|
||||||
|
}),
|
||||||
{
|
{
|
||||||
title: 'Anonymous',
|
title: 'Anonymous',
|
||||||
name: 'anonymous',
|
name: 'anonymous',
|
||||||
|
Loading…
Reference in New Issue
Block a user