mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
feat: show 404 error for non-existent objects in edit pages
This commit is contained in:
@ -43,6 +43,11 @@ class RoleEditPage extends React.Component {
|
||||
getRole() {
|
||||
RoleBackend.getRole(this.state.organizationName, this.state.roleName)
|
||||
.then((role) => {
|
||||
if (role === null) {
|
||||
this.props.history.push("/404");
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({
|
||||
role: role,
|
||||
});
|
||||
|
Reference in New Issue
Block a user