Browse Source

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]
backport/53466/stable30
nfebe 4 months ago
committed by backportbot[bot]
parent
commit
02eaabc5ae
  1. 19
      apps/files_sharing/src/views/SharingTab.vue

19
apps/files_sharing/src/views/SharingTab.vue

@ -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() {

Loading…
Cancel
Save