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

Use write permission when possible #1488

Merged
merged 1 commit into from
Mar 4, 2021

Conversation

juliusknorr
Copy link
Member

Fixes an issue where the same file is present in the users files multiple times, e.g. through different shares where on one the user has read only and on the other write permissions. As we currently only track file opening by file id there is no way to determine in the text app session which of the file mounts should be used so this patch makes sure we always use the widest permissions when trying to access the file.

The ideal solution would probably be to track the file open path for every session but that would of course then break editing sessions where the file is moved around, so i felt like this approach is the more feasible option, but I'm open for suggestions if anyone has better ideas to solve this.

Note this is also an issue for Collabora/ONLYOFFICE or any other app or code that attempts to get a file by id, so we might have plenty of other places where this is happening as just using the first element seems quite common in the existing codebase.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr added bug Something isn't working 3. to review labels Mar 2, 2021
@rullzer rullzer merged commit f5f34e3 into master Mar 4, 2021
@delete-merged-branch delete-merged-branch bot deleted the bugfix/noid/write-permission-if-possible branch March 4, 2021 19:36
@juliusknorr
Copy link
Member Author

/backport to stable21

@juliusknorr
Copy link
Member Author

/backport to stable20

@juliusknorr
Copy link
Member Author

/backport to stable19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants