flatpak / xdg-desktop-portal

Desktop integration portal
https://flatpak.github.io/xdg-desktop-portal/
GNU Lesser General Public License v2.1
575 stars 188 forks source link

Timing out permissions #325

Open matthiasclasen opened 5 years ago

matthiasclasen commented 5 years ago

One idea that has come up repeatedly in design discussions around portals and permission uis is to 'time out' permissions that were granted after a period of non-use.

For example, if you grant your web browser permission to use the webcam, and you use it every day for video conferencing, we don't want to ask you again a week later. But if you once needed to scan in some receipt, and a year later the homebanking app tries to turn on your webcam again, we do want to ask again.

To implement this, we need to keep mtime and atime equivalents for permissions. This could mostly be handled in the permission store itself, but unfortunately, we have api that hands out entire tables without a chance for us to know which row was actually accessed, so this needs some rethinking.

Mikenux commented 1 year ago

Alternatively, have a camera portal that allows selecting the camera device with the option to always use that device? Also, maybe have the option of a UX focused on disabling permission rather than re-requesting, e.g. in GNOME there is an indicator (at least shown in mockups), but it could be more obvious, like showing a notification.

Which other portals are concerned?

RokeJulianLockhart commented 10 months ago

https://github.com/flatpak/xdg-desktop-portal/issues/325#issue-445456482

However, @matthiasclasen, this functionality must be possible to disable, for a specific permission of a specific application, the application itself, user-wide, and system-wide. Some systems are use-critical, and like on my smartphone, I need to be able to disable this at those levels. I am able to on cpe:2.3:o:google:android:13. Of course, https://github.com/flatpak/xdg-desktop-portal/issues/471#issue-599474847 would be relevant for this.