Skip to content

Commit 8362640

Browse files
fix: solve publicly shared document with hide download issue
Signed-off-by: Luka Trovic <[email protected]>
1 parent faa8b69 commit 8362640

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

cypress/e2e/share.spec.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,4 @@ describe('Open test.md in viewer', function() {
122122
cy.get('.modal-mask').should('not.exist')
123123
})
124124
})
125-
126-
it('Share a file with download disabled shows an error', function() {
127-
cy.shareFileToUser('test.md', recipient, {
128-
attributes: '[{"scope":"permissions","key":"download","enabled":false}]',
129-
}).then(() => {
130-
cy.login(recipient)
131-
cy.visit('/apps/files')
132-
cy.openFile('test.md')
133-
cy.getModal().find('.empty-content__title').should('contain', 'Failed to load file')
134-
cy.getModal().getContent().should('not.exist')
135-
})
136-
})
137-
138125
})

cypress/e2e/workspace.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe('Workspace', function() {
5959
cy.get('.files-fileList').should('contain', 'README.md')
6060
cy.get('#rich-workspace .ProseMirror')
6161
.should('contain', 'Hello world')
62-
cy.get('a[href*="/apps/files/recent"]')
62+
cy.get('li[data-id="recent"] a.nav-icon-recent')
6363
.click()
6464
cy.get('#rich-workspace .ProseMirror')
6565
.should('not.visible')

lib/Service/DocumentService.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,10 +495,6 @@ public function checkSharePermissions($shareToken, $permission = Constants::PERM
495495
if (($share->getPermissions() & $permission) === 0) {
496496
throw new NotFoundException();
497497
}
498-
499-
if ($share->getHideDownload()) {
500-
throw new NotPermittedException();
501-
}
502498
}
503499

504500
public function hasUnsavedChanges(Document $document) {

0 commit comments

Comments
 (0)