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

[SPACES] WebDAV permissions in files #3997

Merged
merged 6 commits into from
Apr 3, 2023
Merged

Conversation

JuancaG05
Copy link
Collaborator

@JuancaG05 JuancaG05 commented Mar 28, 2023

Related Issues

App: #3890

In this PR we handle permissions related to files (for oC10 as well). Specifically, we handle these cases:

  • When a file doesn't have the W permission (write), we show "Open with (read only)" instead of "Open with", in the main file list with only the file selected, in the details view and in its preview. Also, this file cannot be modified by external apps since we send it without the write permission flag. NOTE: oC10 always sends W in the permissions although the file doesn't actually have it, so the error is handled in backend in this case (error message shown in the app)
  • When a file or folder doesn't have the R permission (reshare), we hide the "Share" option in the main file list with only the file selected, in the details view and in its preview. NOTE: in oCIS accounts, at the moment it is not possible to share files from a space that is not the personal, so this option won't appear anyway

The next points do not apply to oC10 since there, a user can have lack of permissions over a file or folder only when it is shared with them, and when this occurs, a new synchronized copy of the file is created for them, so that they will always have these permissions because the operations apply to their local copy:

  • When a file (or folder) doesn't have the D permission (delete), we hide the "Remove" option in the main file list with the file selected (also if it is selected among some others), in the details view and in its preview
  • When a file (or folder) doesn't have the N permission (rename), we hide the "Rename" option in the main file list with only the file selected, in the details view and in its preview (in the preview wasn't shown before either, it is work to do)
  • When a file (or folder) doesn't have the V permission (move), we hide the "Move" option in the main file list with only the file selected (also if it is selected among some others)

QA

@JuancaG05 JuancaG05 self-assigned this Mar 28, 2023
@JuancaG05 JuancaG05 changed the title [SPACES] Spaces permissions in folders [SPACES] Spaces permissions in files Mar 28, 2023
@JuancaG05 JuancaG05 linked an issue Mar 28, 2023 that may be closed by this pull request
10 tasks
@abelgardep abelgardep changed the title [SPACES] Spaces permissions in files [SPACES] WebDav permissions in files Mar 28, 2023
@JuancaG05 JuancaG05 changed the title [SPACES] WebDav permissions in files [SPACES] WebDAV permissions in files Mar 28, 2023
@JuancaG05 JuancaG05 force-pushed the spaces/folder_permissions branch from c8266aa to 9ea907c Compare March 29, 2023 06:32
@JuancaG05 JuancaG05 force-pushed the spaces/file_permissions branch from 7f3772c to 903f82d Compare March 29, 2023 06:33
Base automatically changed from spaces/folder_permissions to master March 29, 2023 06:54
@JuancaG05 JuancaG05 marked this pull request as ready for review March 29, 2023 10:13
@JuancaG05 JuancaG05 requested a review from abelgardep March 29, 2023 10:13
@JuancaG05 JuancaG05 force-pushed the spaces/file_permissions branch from 17c1525 to 0cdd283 Compare March 29, 2023 10:20
Copy link
Contributor

@abelgardep abelgardep left a comment

Choose a reason for hiding this comment

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

A suggestion here @JuancaG05

@JuancaG05 JuancaG05 force-pushed the spaces/file_permissions branch from f7c613e to b27bd4e Compare March 31, 2023 09:25
@JuancaG05 JuancaG05 requested a review from abelgardep March 31, 2023 09:26
@jesmrec
Copy link
Collaborator

jesmrec commented Mar 31, 2023

Some comments about QA, related with the exposed in the top message

  • Can Edit only tested in oCIS, because a potential bug in oC10 (W permission listed even though the item does not have such permission). Issue created Shared file without edit permission is editable core#40716
  • Can Share only tested in oC10. Resharing not implemented in oCIS yet.
  • Move, Delete and Rename operations, only tested in oCIS, for spaces with no edit permission (viewers)

@jesmrec
Copy link
Collaborator

jesmrec commented Mar 31, 2023

Approved on my side

@abelgardep abelgardep force-pushed the spaces/file_permissions branch from b27bd4e to 277ede3 Compare March 31, 2023 13:07
@JuancaG05 JuancaG05 merged commit ef3eefe into master Apr 3, 2023
@JuancaG05 JuancaG05 deleted the spaces/file_permissions branch April 3, 2023 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SPACES] WebDAV permissions
3 participants