Merge pull request #58718 from nextcloud/backport/58204/stable32
Some checks are pending
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Integration sqlite / changes (push) Waiting to run
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, --tags ~@large files_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, capabilities_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, collaboration_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, comments_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, dav_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, federation_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, file_conversions) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, files_reminders) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, filesdrop_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, ldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, openldap_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, openldap_numerical_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, remoteapi_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, routing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, setup_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, sharees_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, sharing_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, theming_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite (stable32, 8.1, stable32, videoverification_features) (push) Blocked by required conditions
Integration sqlite / integration-sqlite-summary (push) Blocked by required conditions

[stable32] Remove external shares from share list
This commit is contained in:
Daniel 2026-03-04 18:19:47 +01:00 committed by GitHub
commit a1d3429f67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 32 additions and 48 deletions

View file

@ -432,23 +432,8 @@ export default {
)
for (const share of shares) {
if ([ShareType.Link, ShareType.Email].includes(share.type)) {
this.linkShares.push(share)
} else if ([ShareType.Remote, ShareType.RemoteGroup].includes(share.type)) {
if (this.config.showFederatedSharesToTrustedServersAsInternal) {
if (share.isTrustedServer) {
this.shares.push(share)
} else {
this.externalShares.push(share)
}
} else if (this.config.showFederatedSharesAsInternal) {
this.shares.push(share)
} else {
this.externalShares.push(share)
}
} else {
this.shares.push(share)
}
const shareList = this.findShareListByShare(share)
shareList.push(share)
}
logger.debug(`Processed ${this.linkShares.length} link share(s)`)
@ -510,23 +495,8 @@ export default {
* @param {Function} [resolve] a function to run after the share is added and its component initialized
*/
addShare(share, resolve = () => { }) {
// only catching share type MAIL as link shares are added differently
// meaning: not from the ShareInput
if (share.type === ShareType.Email) {
this.linkShares.unshift(share)
} else if ([ShareType.Remote, ShareType.RemoteGroup].includes(share.type)) {
if (this.config.showFederatedSharesAsInternal) {
this.shares.unshift(share)
} if (this.config.showFederatedSharesToTrustedServersAsInternal) {
if (share.isTrustedServer) {
this.shares.unshift(share)
}
} else {
this.externalShares.unshift(share)
}
} else {
this.shares.unshift(share)
}
const shareList = this.findShareListByShare(share)
shareList.unshift(share)
this.awaitForShare(share, resolve)
},
/**
@ -535,13 +505,27 @@ export default {
* @param {Share} share the share to remove
*/
removeShare(share) {
// Get reference for this.linkShares or this.shares
const shareList
= share.type === ShareType.Email
|| share.type === ShareType.Link
? this.linkShares
: this.shares
const index = shareList.findIndex(item => item.id === share.id)
this.removeShareFromList(this.findShareListByShare(share), share)
},
findShareListByShare(share) {
if (share.type === ShareType.Remote || share.type === ShareType.RemoteGroup) {
if (this.config.showFederatedSharesToTrustedServersAsInternal) {
return share.isTrustedServer ? this.shares : this.externalShares
} else if (this.config.showFederatedSharesAsInternal) {
return this.shares
} else {
return this.externalShares
}
} else if (share.type === ShareType.Email || share.type === ShareType.Link) {
return this.linkShares
} else {
return this.shares
}
},
removeShareFromList(shareList, share) {
const index = shareList.findIndex((item) => item.id === share.id)
if (index !== -1) {
shareList.splice(index, 1)
}

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
4505-4505.js.license

File diff suppressed because one or more lines are too long

1
dist/9530-9530.js.map vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/9530-9530.js.map.license vendored Symbolic link
View file

@ -0,0 +1 @@
9530-9530.js.license

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long