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

Feature/read only public share #11898

Merged
merged 7 commits into from
Oct 30, 2018
Merged

Feature/read only public share #11898

merged 7 commits into from
Oct 30, 2018

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Oct 18, 2018

This adds a new option to shares to mark them as read only (currently only for link share). By default this is always false.

  • Add db column
  • Add to IShare
  • Set value for link shares
  • Update API to handle for link shares
  • Expose in public sharing page

Todo:

  • Add to menu on share sidebar
  • Add to other share types? (email? talk?)
  • Hide download button etc on public sharing page
  • Extend apps to use this

@danxuliu
Copy link
Member

danxuliu commented Oct 19, 2018

This setting should be called Disable download Hide download instead of Read only, as Read only sounds like something related to permissions, but you could have a public link that is editable... and read only.

@rullzer
Copy link
Member Author

rullzer commented Oct 19, 2018

This setting should be called Disable download instead of Read only, as Read only sounds like something related to permissions, but you could have a public link that is editable... and read only.

🙊 yes... I'll take care of that next week

@rullzer rullzer force-pushed the feature/read_only_public_share branch from 3010c63 to ba831e3 Compare October 21, 2018 11:51
@rullzer
Copy link
Member Author

rullzer commented Oct 21, 2018

@danxuliu fixed :)

@danxuliu
Copy link
Member

Good naming with Hide download, much better indeed than Disable download; subtle ;-)

I have added a checkbox to the link share menu of files (not folders, as it is not clear how this should work with folders) to hide the download button and header menu in the public share page.

@rullzer
Copy link
Member Author

rullzer commented Oct 28, 2018

Clients: @tobiasKaminsky @marinofaggiana @camilasan and awell @rullzer

This hideDownload is a new option to modify shares with. (link shares only right now).
It is only required for you to be able to set it.

@rullzer rullzer force-pushed the feature/read_only_public_share branch from f70f3d3 to d728f86 Compare October 29, 2018 11:45
@rullzer rullzer added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Oct 29, 2018
@tobiasKaminsky
Copy link
Member

@rullzer how is this set? Just like the hidden upload feature?
It is called "Hide download" on UI, but how is the parameter called?

@rullzer
Copy link
Member Author

rullzer commented Oct 30, 2018

@rullzer how is this set? Just like the hidden upload feature?
It is called "Hide download" on UI, but how is the parameter called?

the paremeter (whe modifying a share is) hideDownload

@juliusknorr
Copy link
Member

juliusknorr commented Oct 30, 2018

@rullzer @danxuliu Setting it in the UI doesn't work for me. The loading spinner is visibile forever and the setting doesn't seem to be set after reload/when opening the share link.

@danxuliu
Copy link
Member

Setting it in the UI doesn't work for me. The loading spinner is visibile forever and the setting doesn't seem to be set after reload/when opening the share link.

I fixed that yesterday, but as far as I can see when the branch was squashed by @rullzer my two last commits were left out :-P I will add and squash them again.

@rullzer
Copy link
Member Author

rullzer commented Oct 30, 2018

whoops :S

rullzer and others added 5 commits October 30, 2018 15:18
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
When the "hide download" property of a share is set the public share
page will not show the download button nor the menu with the download,
direct link and "Add to your Nextcloud" actions; the "downloadURL"
hidden field will not be included either in the generated HTML.

Despite that, note that the "downloadURL" parameter is still set and
passed to the template, as this could be needed anyway to generate
previews (for example, of audio files).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Hiding the download does not depend on other settings and it does not
affect other settings either (for example, it would be possible to hide
the downloads yet make the share editable), so a simple checkbox was
added to the menu. However, note that this option is only available for
files, but not for folders.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu force-pushed the feature/read_only_public_share branch from d728f86 to d4f39a9 Compare October 30, 2018 14:20
@danxuliu
Copy link
Member

Done.

@rullzer rullzer added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Oct 30, 2018
@rullzer rullzer merged commit 5141858 into master Oct 30, 2018
@rullzer rullzer deleted the feature/read_only_public_share branch October 30, 2018 18:25
@tobiasKaminsky
Copy link
Member

Android implemenetd.

@marinofaggiana
Copy link
Member

marinofaggiana commented Nov 20, 2018

@tobiasKaminsky when a file/folder is shared with "hidedownload" option on client the "save/open in" is hide ?

@marinofaggiana
Copy link
Member

nextcloud/ios#729

Add Hide download parameter on Share link, done.

@tobiasKaminsky
Copy link
Member

@tobiasKaminsky when a file/folder is shared with "hidedownload" option on client the "save/open in" is hide ?

This is completely independent from our clients, but only affects web page, when you open up the share via link.

@marinofaggiana
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement feature: sharing high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants