feat(files_sharing): Hide external shares for users in excluded groups

- Added frontend check to hide link shares if, public sharing is disabled.

Signed-off-by: nfebe <fenn25.fn@gmail.com>

[skip ci]
This commit is contained in:
nfebe 2025-06-13 12:07:22 +01:00 committed by backportbot[bot]
parent 33756535d7
commit 02eaabc5ae

View file

@ -148,7 +148,24 @@ export default {
* @return {boolean}
*/
isSharedWithMe() {
return Object.keys(this.sharedWithMe).length > 0
return this.sharedWithMe !== null
&& this.sharedWithMe !== undefined
},
/**
* Is link sharing allowed for the current user?
*
* @return {boolean}
*/
isLinkSharingAllowed() {
const currentUser = getCurrentUser()
if (!currentUser) {
return false
}
const capabilities = getCapabilities()
const publicSharing = capabilities.files_sharing?.public || {}
return publicSharing.enabled === true
},
canReshare() {