-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1098 from nextcloud/backport/1077/stable30
[stable30] Show error when trying to open a shared PDF without download permissions
- Loading branch information
Showing
20 changed files
with
136 additions
and
23 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
SPDX-License-Identifier: MIT | ||
SPDX-License-Identifier: ISC | ||
SPDX-License-Identifier: GPL-3.0-or-later | ||
SPDX-License-Identifier: AGPL-3.0-or-later | ||
SPDX-License-Identifier: (MPL-2.0 OR Apache-2.0) | ||
SPDX-FileCopyrightText: escape-html developers | ||
SPDX-FileCopyrightText: Roman Shtylman <[email protected]> | ||
SPDX-FileCopyrightText: Roeland Jago Douma | ||
SPDX-FileCopyrightText: John Molakvoæ <[email protected]> | ||
SPDX-FileCopyrightText: James Halliday | ||
SPDX-FileCopyrightText: GitHub Inc. | ||
SPDX-FileCopyrightText: Dr.-Ing. Mario Heiderich, Cure53 <[email protected]> (https://cure53.de/) | ||
SPDX-FileCopyrightText: Christoph Wurst | ||
SPDX-FileCopyrightText: Alkemics | ||
|
||
|
||
This file is generated from multiple sources. Included packages: | ||
- @nextcloud/browser-storage | ||
- version: 0.4.0 | ||
- license: GPL-3.0-or-later | ||
- @nextcloud/capabilities | ||
- version: 1.2.0 | ||
- license: GPL-3.0-or-later | ||
- semver | ||
- version: 7.6.2 | ||
- license: ISC | ||
- @nextcloud/initial-state | ||
- version: 2.2.0 | ||
- license: GPL-3.0-or-later | ||
- @nextcloud/l10n | ||
- version: 3.1.0 | ||
- license: GPL-3.0-or-later | ||
- cancelable-promise | ||
- version: 4.3.1 | ||
- license: MIT | ||
- dompurify | ||
- version: 3.1.5 | ||
- license: (MPL-2.0 OR Apache-2.0) | ||
- escape-html | ||
- version: 1.0.3 | ||
- license: MIT | ||
- path-browserify | ||
- version: 1.0.1 | ||
- license: MIT | ||
- process | ||
- version: 0.11.10 | ||
- license: MIT | ||
- files_pdfviewer | ||
- version: 3.0.0 | ||
- license: AGPL-3.0-or-later |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
files_pdfviewer-init.js.license |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
import { registerDavProperty } from '@nextcloud/files' | ||
|
||
import isPublicPage from './utils/isPublicPage.js' | ||
import isPdf from './utils/isPdf.js' | ||
import isSecureViewerAvailable from './utils/isSecureViewerAvailable.js' | ||
|
||
// The "share-attributes" DAV property needs to be explicitly registered so the | ||
// viewer returns it in the file info. This is implicitly done by the Files app, | ||
// so it does not need to be explicitly done by the PDF viewer when it is opened | ||
// in the Files app, only for public shares pages. | ||
if (isPublicPage() && isPdf() && !isSecureViewerAvailable()) { | ||
registerDavProperty('nc:share-attributes', { nc: 'http://nextcloud.org/ns' }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters