Skip to content

Commit

Permalink
Remove federated sharing hint if federation is disabled (#6951)
Browse files Browse the repository at this point in the history
Remove federated sharing hint if federation is disabled
  • Loading branch information
JammingBen authored May 12, 2022
1 parent f5816c8 commit f7558be
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Share hint with disabled federated sharing

We've removed any occurrences of federated sharing in the hint below the sharing input field if federated sharing is disabled.

https://github.com/owncloud/web/issues/5261
https://github.com/owncloud/web/pull/6951
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default {
},
computed: {
...mapGetters('Files', ['currentFileOutgoingCollaborators', 'highlightedFile']),
...mapGetters(['configuration', 'getToken', 'user']),
...mapGetters(['configuration', 'getToken', 'user', 'capabilities']),
helpersEnabled() {
return this.configuration?.options?.contextHelpers
Expand All @@ -155,7 +155,10 @@ export default {
},
inviteDescriptionMessage() {
return this.$gettext('Add new person by name, email or federation IDs')
if (this.capabilities.files_sharing.federation?.outgoing === true) {
return this.$gettext('Add new person by name, email or federation IDs')
}
return this.$gettext('Add new person by name or email')
},
$_announcementWhenCollaboratorAdded() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ function getWrapper({ selectedCollaborators = [], storageId, highlightedFile = f
},
getters: {
getToken: jest.fn(() => 'GFwHKXdsMgoFwt'),
capabilities: () => ({
files_sharing: { federation: { incoming: true, outgoing: true } }
}),
configuration: jest.fn(() => ({
options: {
contextHelpers: true
Expand Down

0 comments on commit f7558be

Please sign in to comment.