1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-18 06:57:52 +00:00

Merge pull request #3368 from haiwen/add-org-exit

add org admin exit
This commit is contained in:
Daniel Pan 2019-04-26 10:58:52 +08:00 committed by GitHub
commit 2c6cf81159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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