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

Inform users when a permission is required for a demo #915

Closed
sonnyp opened this issue Mar 23, 2024 · 8 comments · Fixed by #985
Closed

Inform users when a permission is required for a demo #915

sonnyp opened this issue Mar 23, 2024 · 8 comments · Fixed by #985
Milestone

Comments

@sonnyp
Copy link
Contributor

sonnyp commented Mar 23, 2024

Currently, Workbench is considered as "probably safe" by Flathub and GNOME Software.

The reason it is not considered "Safe" is because we require network and audio permission (via --socket=pulseaudio and --share=network. Those are not strictly required to use Workbench and are only needed for a handful of demos. In addition, we would also like to add a permission for gamepads workbenchdev/demos#88

Eventually there will be portals for all of these things but until then we need static permissions.

Let's

  1. remove those permissions so that Workbench is considered safe
  2. add a mechanism for demos to advertise which permissions they need - maybe flatpak-finish-args: ["--socket=fallback-x11"] in main.json
  3. when a needed permission is not enabled, Workbench should show a dialog on "Run" to explain what this is about and how to enable the permission using flatpak overrides

Since overrides are permanent - it should be a one time thing only anyway.

@sonnyp
Copy link
Contributor Author

sonnyp commented Mar 23, 2024

@bragefuglseth would you be interested in proposing a copy / design for 3?

@bragefuglseth
Copy link
Contributor

bragefuglseth commented Mar 30, 2024

Hey, and sorry for the late response! I can have a shot at it if you can provide some textual content / an instruction set to be conveyed in the dialog. I'm not too knowledgeable on that stuff 😃

@sonnyp
Copy link
Contributor Author

sonnyp commented Jul 2, 2024

@bragefuglseth the dialog would show when a user press "Run" on a demo that require static Flatpak permissions (not portal permissions) that aren't enabled for Workbench.


We can say something like:

"Permission(s) needed"

To run this project, additional permissions are needed for Workbench.
Please run the following command in your terminal and restart Workbench

flatpak override --user --share=network --socket=pulseaudio --share=device re.sonny.Workbench.Devel

Here are screenshots of our current similar dialogs

image

image

@bragefuglseth
Copy link
Contributor

Sorry for the late response again! This is on my todo list.

@bragefuglseth
Copy link
Contributor

bragefuglseth commented Jul 18, 2024

Any thoughts on this? I think it's nice to give a brief overview of what people are actually doing when running the command. The explanation can also serve as a useful introduction to the sandbox permission system for aspiring app developers. The descriptions may not be 100% accurate; you can change those as you see fit.

I imagine that the external link symbol would open the sandbox permissions documentation.

permissions

@sonnyp
Copy link
Contributor Author

sonnyp commented Jul 18, 2024

I love it :)

--user isn't a permission so we just need the last 3

@bragefuglseth
Copy link
Contributor

bragefuglseth commented Jul 18, 2024

I thought it would be nice to include to reassure people that it will only affect their account or whatever, but feel free to exclude it 🙂

Here's the illustration SVG:

permissions

@Mikenux

This comment was marked as off-topic.

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 a pull request may close this issue.

3 participants