Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Do not show e-mail suggestions if link shares are disabled
For #17774

This removes the e-mail suggestions from the share input if link shares
are disabled. As e-mail shares use just link shares.

Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer committed Jan 6, 2020
commit 9a8b3619119fed6dd137545ba54deea30528265f
130 changes: 65 additions & 65 deletions apps/files_sharing/js/dist/files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/files_sharing/js/dist/files_sharing_tab.js.map

Large diffs are not rendered by default.

17 changes: 16 additions & 1 deletion apps/files_sharing/src/components/SharingInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default {
return t('files_sharing', 'Name, federated cloud ID or email address …')
}

return t('files_sharing', 'Name …')
return t('files_sharing', 'Name …')
},

isValidQuery() {
Expand Down Expand Up @@ -184,13 +184,28 @@ export default {
lookup = true
}

const shareType = [
this.SHARE_TYPES.SHARE_TYPE_USER,
this.SHARE_TYPES.SHARE_TYPE_GROUP,
this.SHARE_TYPES.SHARE_TYPE_REMOTE,
this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP,
this.SHARE_TYPES.SHARE_TYPE_CIRCLE,
this.SHARE_TYPES.SHARE_TYPE_ROOM,
this.SHARE_TYPES.SHARE_TYPE_GUEST,
]

if (OC.getCapabilities()['files_sharing']['public']['enabled'] === true) {
shareType.push(this.SHARE_TYPES.SHARE_TYPE_EMAIL)
}

const request = await axios.get(generateOcsUrl('apps/files_sharing/api/v1') + 'sharees', {
params: {
format: 'json',
itemType: this.fileInfo.type === 'dir' ? 'folder' : 'file',
search,
lookup,
perPage: this.config.maxAutocompleteResults,
shareType,
},
})

Expand Down
1 change: 1 addition & 0 deletions apps/files_sharing/src/services/ConfigService.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ export default class Config {
*/
get isMailShareAllowed() {
return OC.appConfig.shareByMailEnabled !== undefined
&& OC.getCapabilities()['files_sharing']['public']['enabled'] === true
}

/**
Expand Down