1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 10:50:24 +00:00

add org admin exit

This commit is contained in:
ilearnit
2019-04-26 02:25:27 +00:00
parent 4a277240f9
commit f560bc138e

View File

@@ -92,14 +92,18 @@ class Account extends Component {
}
renderMenu = () => {
let isAdminPage = this.state.isStaff || this.state.isOrgStaff;
if (isAdminPage && this.props.isAdminPanel) {
if (this.state.isStaff && this.props.isAdminPanel) {
return (
<a href={siteRoot} title={gettext('Exit Admin Panel')} className="item">{gettext('Exit Admin Panel')}</a>
);
}
if (this.state.isOrgStaff && this.props.isAdminPanel) {
return (
<a href={siteRoot} title={gettext('Exit Organization Admin')} className="item">{gettext('Exit Organization Admin')}</a>
);
}
if (this.state.isStaff) {
return (
<a href={siteRoot + 'sys/useradmin/'} title={gettext('System Admin')} className="item">{gettext('System Admin')}</a>