diff --git a/apps/files/src/utils/permissions.ts b/apps/files/src/utils/permissions.ts index 20992117c9443..2c85ede1659f5 100644 --- a/apps/files/src/utils/permissions.ts +++ b/apps/files/src/utils/permissions.ts @@ -16,7 +16,6 @@ export function isDownloadable(node: Node): boolean { if ((node.permissions & Permission.READ) === 0) { return false } - console.log('Node dataaaa', node) // If the mount type is a share, ensure it got download permissions. if (node.attributes['share-attributes']) { diff --git a/apps/files_sharing/src/services/SharingService.ts b/apps/files_sharing/src/services/SharingService.ts index 7d9e83a034af5..2f8144e216e1d 100644 --- a/apps/files_sharing/src/services/SharingService.ts +++ b/apps/files_sharing/src/services/SharingService.ts @@ -64,7 +64,6 @@ const ocsEntryToNode = async function(ocsEntry: any): Promise {{ t('settings', 'Enable server-side encryption') }} @@ -88,26 +89,33 @@ export default { }, data() { const encryptionModules = loadState('settings', 'encryption-modules') + let defaultCheckedModule = '' + if (encryptionModules instanceof Array && encryptionModules.length > 0) { + const defaultModule = Object.entries(encryptionModules).find((module) => module[1].default) + if (defaultModule) { + defaultCheckedModule = foundModule[0] + } + } else { + logger.debug('No encryption module loaded or enabled') + } return { - encryptionReady: loadState('settings', 'encryption-ready'), - encryptionEnabled: loadState('settings', 'encryption-enabled'), + encryptionReady: loadState('settings', 'encryption-ready', false), + encryptionEnabled: loadState('settings', 'encryption-enabled', false), externalBackendsEnabled: loadState('settings', 'external-backends-enabled'), encryptionAdminDoc: loadState('settings', 'encryption-admin-doc'), encryptionModules, shouldDisplayWarning: false, migrating: false, - defaultCheckedModule: Object.entries(encryptionModules).find((module) => module[1].default)[0], + defaultCheckedModule, } }, methods: { displayWarning() { - console.log("IS READY: " + this.encryptionReady) - console.log("ENCRYPTION Enabled: " + this.encryptionEnabled) if (!this.encryptionEnabled) { this.shouldDisplayWarning = !this.shouldDisplayWarning } else { - // this.encryptionEnabled = false - // this.shouldDisplayWarning = false + this.encryptionEnabled = false + this.shouldDisplayWarning = false } }, async update(key, value) {