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>
This commit is contained in:
parent
a7b3ed32ad
commit
9a8b361911
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -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,
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
@ -179,6 +179,7 @@ export default class Config {
|
|||
*/
|
||||
get isMailShareAllowed() {
|
||||
return OC.appConfig.shareByMailEnabled !== undefined
|
||||
&& OC.getCapabilities()['files_sharing']['public']['enabled'] === true
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue