Add User.isGlobalAdmin

This commit is contained in:
Yang Luo
2021-02-15 22:14:19 +08:00
parent d44a5ee2c1
commit 60ad52f7ae
6 changed files with 96 additions and 63 deletions

View File

@ -194,34 +194,37 @@ class App extends Component {
</Link>
</Menu.Item>
);
res.push(
<Menu.Item key="1">
<Link to="/organizations">
Organizations
</Link>
</Menu.Item>
);
res.push(
<Menu.Item key="2">
<Link to="/users">
Users
</Link>
</Menu.Item>
);
res.push(
<Menu.Item key="3">
<Link to="/providers">
Providers
</Link>
</Menu.Item>
);
res.push(
<Menu.Item key="4">
<Link to="/applications">
Applications
</Link>
</Menu.Item>
);
if (Setting.isAdminUser(this.state.account)) {
res.push(
<Menu.Item key="1">
<Link to="/organizations">
Organizations
</Link>
</Menu.Item>
);
res.push(
<Menu.Item key="2">
<Link to="/users">
Users
</Link>
</Menu.Item>
);
res.push(
<Menu.Item key="3">
<Link to="/providers">
Providers
</Link>
</Menu.Item>
);
res.push(
<Menu.Item key="4">
<Link to="/applications">
Applications
</Link>
</Menu.Item>
);
}
return res;
}