mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-11 11:51:27 +00:00
Add department transfer function to the administrator interface (#6014)
* Add the function of transferring departments in the administrator interface * fix admin get all departments * update * Update departments.py * update * update * add department repo transfer * Update groups.py * update --------- Co-authored-by: 孙永强 <11704063+s-yongqiang@user.noreply.gitee.com> Co-authored-by: r350178982 <32759763+r350178982@users.noreply.github.com>
This commit is contained in:
@@ -280,6 +280,12 @@ class Item extends Component {
|
||||
getOperations = () => {
|
||||
const { repo } = this.props;
|
||||
let operations = ['Delete', 'Transfer'];
|
||||
const index = repo.owner_email.indexOf('@seafile_group');
|
||||
let isGroupOwnedRepo = index != -1;
|
||||
if (isGroupOwnedRepo) {
|
||||
operations = ['Transfer'];
|
||||
return operations;
|
||||
}
|
||||
if (!repo.encrypted) {
|
||||
operations.push('Share');
|
||||
}
|
||||
@@ -319,7 +325,7 @@ class Item extends Component {
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
{(!isGroupOwnedRepo && isOpIconShown) &&
|
||||
{(isOpIconShown) &&
|
||||
<OpMenu
|
||||
operations={this.getOperations()}
|
||||
translateOperations={this.translateOperations}
|
||||
@@ -359,8 +365,8 @@ class Item extends Component {
|
||||
<TransferDialog
|
||||
itemName={repo.name}
|
||||
submit={this.onTransferRepo}
|
||||
canTransferToDept={false}
|
||||
toggleDialog={this.toggleTransferDialog}
|
||||
isSysAdmin={true}
|
||||
/>
|
||||
</ModalPortal>
|
||||
}
|
||||
|
Reference in New Issue
Block a user