1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-06 01:12:03 +00:00

add org admin

This commit is contained in:
ilearnit
2018-12-17 08:04:17 +00:00
parent d2ff0bb5eb
commit 7a46213c86
2 changed files with 9 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ class Account extends Component {
quotaUsage: '',
quotaTotal: '',
isStaff: false,
isOrgStaff: false,
usageRate: '',
avatarURL: '',
};
@@ -79,6 +80,7 @@ class Account extends Component {
quotaUsage: Utils.bytesToSize(resp.data.usage),
quotaTotal: Utils.bytesToSize(resp.data.total),
isStaff: resp.data.is_staff,
isOrgStaff: resp.data.is_org_staff === 1 ? true : false,
avatarURL: resp.data.avatar_url
});
});
@@ -90,6 +92,11 @@ class Account extends Component {
<a href={siteRoot + 'sys/useradmin/'} title={gettext('System Admin')} className="item">{gettext('System Admin')}</a>
);
}
if (this.state.isOrgStaff) {
return (
<a href={siteRoot + 'org/useradmin/'} title={gettext('Organization Admin')} className="item">{gettext('Organization Admin')}</a>
);
}
}
renderAvatar = () => {