Skip to content
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

Prevent download on user shares #2280

Merged
merged 1 commit into from
Aug 4, 2022
Merged

Conversation

julien-nc
Copy link
Member

@julien-nc julien-nc commented Jun 20, 2022

Depends on nextcloud/server#32482
Implements #2267

Set the hideDownload attribute of the Wopi token when it's created. Get this from the share permissions. If multiple shares give access to the file, only one with download disabled will lead to hiding it in Collabora.

@julien-nc julien-nc added enhancement New feature or request 3. to review Ready to be reviewed labels Jun 20, 2022
@julien-nc julien-nc requested review from Raudius and juliusknorr June 20, 2022 15:56
Copy link
Contributor

@Raudius Raudius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@PVince81
Copy link
Member

PVince81 commented Jul 1, 2022

would this also apply for documents accessible through public link share ?
note that in this case there's the "hide download" option already, which is stored in a different field. maybe that logic exists already

@julien-nc
Copy link
Member Author

@PVince81 Yes it already exists for public link shares: The view-only mode is enabled according to the "hide download" share attribute.

Will the download permission be relevant in public shares? I mean, do we need to adapt the way we enable the view-only mode for public shares so that we check the "hide download" value AND the download permission?

@PVince81
Copy link
Member

PVince81 commented Jul 1, 2022

@eneiluj you don't need to adapt it then. When resharing with a public link, the download permission is converted to "hide download" to be able to benefit from existing logic.

the perm from the share attributes is only intended for local shares.

@juliusknorr juliusknorr linked an issue Jul 4, 2022 that may be closed by this pull request
@julien-nc julien-nc force-pushed the enh/2267/prevent-download branch from 8531d65 to 5f5d160 Compare July 5, 2022 09:01
@juliusknorr
Copy link
Member

/backport to stable24

@juliusknorr
Copy link
Member

juliusknorr commented Aug 2, 2022

  • Needs another full test round after server PR is merged now

@CarlSchwan
Copy link
Member

Server PR is merged for master, I'm in the progress of backporting it

@juliusknorr juliusknorr force-pushed the enh/2267/prevent-download branch from 5f5d160 to 4ef5088 Compare August 3, 2022 08:46
@juliusknorr
Copy link
Member

juliusknorr commented Aug 3, 2022

  • We should make sure this also works if getAttributes is not available in case stable24 is not updated yet to the back ported version

@juliusknorr juliusknorr force-pushed the enh/2267/prevent-download branch 2 times, most recently from 83f687c to 03d2819 Compare August 4, 2022 10:22
…ssion

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
@juliusknorr juliusknorr force-pushed the enh/2267/prevent-download branch from 03d2819 to 6f904ca Compare August 4, 2022 11:16
@juliusknorr juliusknorr merged commit 5b2cb1b into master Aug 4, 2022
@delete-merged-branch delete-merged-branch bot deleted the enh/2267/prevent-download branch August 4, 2022 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Ready to be reviewed enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make use of share attributes for prevent download
5 participants