fix: can't access pages without permission via url (#826)
(cherry picked from commit 92e71c3b01fb63f26ab905249be03a85c546c4bd)
This commit is contained in:
parent
fd21447810
commit
fcccacfdf4
@ -80,12 +80,22 @@ const MenuEditor = (props) => {
|
||||
const s = findByUid(schema, defaultSelectedUid);
|
||||
if (s) {
|
||||
setTitle(s.title);
|
||||
} else {
|
||||
const s = findMenuItem(schema);
|
||||
if (s) {
|
||||
history.push(`/admin/${s['x-uid']}`);
|
||||
setTitle(s.title);
|
||||
} else {
|
||||
history.push(`/admin/`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const s = findMenuItem(schema);
|
||||
if (s) {
|
||||
history.push(`/admin/${s['x-uid']}`);
|
||||
setTitle(s.title);
|
||||
} else {
|
||||
history.push(`/admin/`);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user