1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-31 22:57:47 +00:00

fix select bug when admin share repo to group (#5931)

This commit is contained in:
lian 2024-01-31 13:30:27 +08:00 committed by GitHub
parent f5fdebe5bb
commit 690d4a6a8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -172,10 +172,8 @@ class SysAdminShareToGroup extends React.Component {
shareToGroup = () => { shareToGroup = () => {
let groups = []; let groups = [];
let repoID = this.props.repoID; let repoID = this.props.repoID;
if (this.state.selectedOption && this.state.selectedOption.length > 0 ) { if (this.state.selectedOption) {
for (let i = 0; i < this.state.selectedOption.length; i ++) { groups[0] = this.state.selectedOption.id;
groups[i] = this.state.selectedOption[i].id;
}
} }
seafileAPI.sysAdminAddRepoSharedItem(repoID, 'group', groups, this.state.permission).then(res => { seafileAPI.sysAdminAddRepoSharedItem(repoID, 'group', groups, this.state.permission).then(res => {
let errorMsg = []; let errorMsg = [];