Add appconfig to always show the unique label of a sharee
Signed-off-by: Julius Härtl <jus@bitgrid.net> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
This commit is contained in:
parent
939db1f466
commit
96287f336e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -115,7 +115,8 @@ class Capabilities implements ICapability {
|
||||||
|
|
||||||
// Sharee searches
|
// Sharee searches
|
||||||
$res['sharee'] = [
|
$res['sharee'] = [
|
||||||
'query_lookup_default' => $this->config->getSystemValueBool('gs.enabled', false)
|
'query_lookup_default' => $this->config->getSystemValueBool('gs.enabled', false),
|
||||||
|
'always_show_unique' => $this->config->getAppValue('files_sharing', 'always_show_unique', 'yes') === 'yes',
|
||||||
];
|
];
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -398,7 +398,9 @@ export default {
|
||||||
*/
|
*/
|
||||||
formatForMultiselect(result) {
|
formatForMultiselect(result) {
|
||||||
let desc
|
let desc
|
||||||
if ((result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_REMOTE
|
if (result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_USER && this.config.shouldAlwaysShowUnique) {
|
||||||
|
desc = result.shareWithDisplayNameUnique ?? ''
|
||||||
|
} else if ((result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_REMOTE
|
||||||
|| result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
|
|| result.value.shareType === this.SHARE_TYPES.SHARE_TYPE_REMOTE_GROUP
|
||||||
) && result.value.server) {
|
) && result.value.server) {
|
||||||
desc = t('files_sharing', 'on {server}', { server: result.value.server })
|
desc = t('files_sharing', 'on {server}', { server: result.value.server })
|
||||||
|
|
|
@ -229,6 +229,15 @@ export default class Config {
|
||||||
return (OC.getCapabilities().files_sharing.sharebymail === undefined) ? false : OC.getCapabilities().files_sharing.sharebymail.password.enforced
|
return (OC.getCapabilities().files_sharing.sharebymail === undefined) ? false : OC.getCapabilities().files_sharing.sharebymail.password.enforced
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {boolean}
|
||||||
|
* @readonly
|
||||||
|
* @memberof Config
|
||||||
|
*/
|
||||||
|
get shouldAlwaysShowUnique() {
|
||||||
|
return (OC.getCapabilities().files_sharing?.sharee?.always_show_unique === true)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is sharing with groups allowed ?
|
* Is sharing with groups allowed ?
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue