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

Allow access to common xdg directories #277

Merged
merged 2 commits into from
Aug 31, 2022

Conversation

Feinzer
Copy link
Contributor

@Feinzer Feinzer commented Jun 12, 2022

Partially fixes #33 and #68

Following the discussions on #33 I can see why we can't allow access to the entire user's home so this would at least help by allowing read-only access to more common directories.

@flathubbot
Copy link
Contributor

Started test build 95877

@flathubbot
Copy link
Contributor

Build 95877 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/93615/im.riot.Riot.flatpakref

@SISheogorath
Copy link
Collaborator

Hi @Feinzer given it was a small comment you might missed it, when reading through: #33 (comment)

When you give read-only access to a directory, it still shows up in the saving dialogue and while you can select it and press save, it'll neither show an error, nor save the file. This is terrible from a UX perspective.

While the absence of directories is also not ideal, users can at least ask the question "why is it missing? How can I add them?" There is an indication what works and what doesn't. For the read-only variant, it's not transparent at all, because saving a file, opens a dialogue which will close as if it would have saved the file, but if you delete the file from matrix, it's gone for good, not saved into your documents directory as you might expected.

@Feinzer
Copy link
Contributor Author

Feinzer commented Jun 13, 2022

You're right, I missed it. Could we maybe have them as read-write then since nothing important from a security standpoint lives there?

Of course, the best solution would be for flatpak to prompt the user for permission when accessing their Documents, for example like an Android phone does. However since this functionality does not currently exist and these are basic directories a user would have files saved which they'd want to share, I believe the default should be to allow using them.

@flathubbot
Copy link
Contributor

Started test build 95992

@flathubbot
Copy link
Contributor

Build 95992 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/93730/im.riot.Riot.flatpakref

@Feinzer Feinzer changed the title Allow read-only access to common xdg directories Allow access to common xdg directories Jun 14, 2022
@Feinzer
Copy link
Contributor Author

Feinzer commented Jun 20, 2022

Hi @SISheogorath

I believe by giving read-write access to these xdg directories we would improve on usability and would not cause any issues when saving files on the client.

Security wise, this should be fine as a Chat application should have access to directories such as Documents, Pictures and so on. No config or sensitive information should be living there

@SISheogorath SISheogorath merged commit 42cae6d into flathub:master Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't access to files
4 participants