Skip to content

[stable30] fix(files_sharing): Hide link shares for users in excluded groups #53553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: stable30
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion apps/files_sharing/src/views/SharingTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down