diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-01-05 15:54:35 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-01-06 10:22:22 +0100 |
commit | 9a8b3619119fed6dd137545ba54deea30528265f (patch) | |
tree | 6b76316e29c918dcd40f9723aefe0757b9412177 /apps/files_sharing/src/components/SharingInput.vue | |
parent | a7b3ed32add9589c6f32319d61d5ba8dd583ee13 (diff) | |
download | nextcloud-server-9a8b3619119fed6dd137545ba54deea30528265f.tar.gz nextcloud-server-9a8b3619119fed6dd137545ba54deea30528265f.zip |
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 <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/src/components/SharingInput.vue')
-rw-r--r-- | apps/files_sharing/src/components/SharingInput.vue | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue index bcb69703548..6b597267de8 100644 --- a/apps/files_sharing/src/components/SharingInput.vue +++ b/apps/files_sharing/src/components/SharingInput.vue @@ -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() { @@ -184,6 +184,20 @@ 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', @@ -191,6 +205,7 @@ export default { search, lookup, perPage: this.config.maxAutocompleteResults, + shareType, }, }) |