Skip to content

Commit

Permalink
fix(files_sharing): always show file request creation option
Browse files Browse the repository at this point in the history
Signed-off-by: skjnldsv <[email protected]>
  • Loading branch information
skjnldsv committed Jul 26, 2024
1 parent b03e812 commit 7ba19f6
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions apps/files_sharing/src/new/newFileRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
import type { Entry, Folder, Node } from '@nextcloud/files'

import { Permission } from '@nextcloud/files'
import { translate as t } from '@nextcloud/l10n'
import FileUploadSvg from '@mdi/svg/svg/file-upload.svg?raw'
import Vue, { defineAsyncComponent } from 'vue'
Expand All @@ -21,12 +20,9 @@ export const entry = {
displayName: t('files_sharing', 'Create file request'),
iconSvgInline: FileUploadSvg,
order: 30,
enabled(context: Folder): boolean {
if ((context.permissions & Permission.SHARE) !== 0) {
// We need to have either link shares creation permissions
return sharingConfig.isPublicShareAllowed
}
return false
enabled(): boolean {
// We will check for the folder permission on the dialog
return sharingConfig.isPublicShareAllowed
},
async handler(context: Folder, content: Node[]) {
// Create document root
Expand Down

0 comments on commit 7ba19f6

Please sign in to comment.