-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
base: master
Are you sure you want to change the base?
Conversation
3a848ee
to
92e64f3
Compare
Tested the behavior. It works, but there are a few issues:
Proposals:
|
92e64f3
to
b95563e
Compare
7ae9b19
to
1c29e9c
Compare
Signed-off-by: nfebe <fenn25.fn@gmail.com>
1c29e9c
to
6bb5bdc
Compare
/compile |
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) | ||
} | ||
} |
There was a problem hiding this comment.
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>
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
Fixes #52635