Skip to content

feat(files_sharing): Toggle display for trusted server shares #53661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nfebe
Copy link
Contributor

@nfebe nfebe commented Jun 24, 2025

Exposes the trust status of federated shares in the Share API, allowing the frontend to filter them based on the new show_federated_shares_to_trusted_servers_as_internal setting.

Usage: occ config:app:set files_sharing show_federated_shares_to_trusted_servers_as_internal --value true --type boolean

Screenshots

Stable31 is trusted server and stable30 is not

Config default or set to false Config set to true
trusted-and-untrusted-mixed trusted-seperated

Fixes #52635

@nfebe nfebe force-pushed the feat/52635/toggle-for-trusted-server-sharing branch 6 times, most recently from 3a848ee to 92e64f3 Compare June 25, 2025 12:41
@nfebe
Copy link
Contributor Author

nfebe commented Jun 25, 2025

Tested the behavior. It works, but there are a few issues:

  • There are two input fields: one for internal shares (users/groups on the same server or trusted servers) and one for external shares (federated).

  • Right now, users can only type federated addresses in the external shares input. With trusted servers now treated as internal, it's unclear where users should enter those addresses.

  • The sidebar is split based on share types. To handle this properly, we need to detect if the entered address belongs to a trusted server and guide the user accordingly.

    • Example feedback:

      • “Server is trusted. Use the internal shares section.”
      • “Server is not trusted. Use the external shares section.”

Proposals:

  • [Current] If a trusted server is entered in the external shares input, the share appears under internal shares.
  • One alternative is to let users enter addresses in either input and automatically sort the result into the right section.

@nfebe nfebe force-pushed the feat/52635/toggle-for-trusted-server-sharing branch from 92e64f3 to b95563e Compare June 25, 2025 14:02
@nfebe nfebe added 3. to review Waiting for reviews feature: sharing labels Jun 25, 2025
@github-project-automation github-project-automation bot moved this to 🏗️ In progress in 📁 Files team Jun 25, 2025
@nfebe nfebe marked this pull request as ready for review June 25, 2025 14:03
@nfebe nfebe requested review from a team as code owners June 25, 2025 14:03
@nfebe nfebe force-pushed the feat/52635/toggle-for-trusted-server-sharing branch 3 times, most recently from 7ae9b19 to 1c29e9c Compare June 25, 2025 16:51
Signed-off-by: nfebe <fenn25.fn@gmail.com>
@nfebe nfebe force-pushed the feat/52635/toggle-for-trusted-server-sharing branch from 1c29e9c to 6bb5bdc Compare June 25, 2025 18:21
@nfebe
Copy link
Contributor Author

nfebe commented Jun 25, 2025

/compile

Comment on lines +197 to 224
const showFederatedAsInternal = this.config.showFederatedSharesAsInternal
|| this.config.showFederatedSharesToTrustedServersAsInternal

if (this.isExternal && !this.config.showFederatedSharesAsInternal) {
shareType.push(...remoteTypes)
if (this.isExternal) {
if (!showFederatedAsInternal) {
shareType.push(...remoteTypes)
}
} else {
shareType = shareType.concat([
shareType = [
ShareType.User,
ShareType.Group,
ShareType.Team,
ShareType.Room,
ShareType.Guest,
ShareType.Deck,
ShareType.ScienceMesh,
])

if (this.config.showFederatedSharesAsInternal) {
]
if (showFederatedAsInternal) {
shareType.push(...remoteTypes)
}
}

if (getCapabilities().files_sharing.public.enabled === true && this.isExternal) {
shareType.push(ShareType.Email)
if (this.config.showFederatedSharesToTrustedServersAsInternal) {
shareType.push(...remoteTypes)
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One alternative is to let users enter addresses in either input and automatically sort the result into the right section.

Updated code to use last option for, the least friction

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@nextcloud-command nextcloud-command requested a review from a team as a code owner June 25, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🏗️ In progress
Development

Successfully merging this pull request may close these issues.

new setting: allow federated shares to trusted servers to appear in the Internal shares section
2 participants