URI/File Type Permissions

Application permissions and default application selection for opening links.

Background

This design is part of integrating Flatpak portals. This also includes Sharing and Content and Device access.

Technical note: the same MIME system is used to associate URI and file types with applications.

Goals

  • Prevent third-party applications opening random links without user consent.
  • Allow users to revoke permissions when they have been granted.
  • Where possible, don't produce UI that is obviously about security. Instead, appear as part of the normal UI workflow.
  • Allow users to change the default application for file types and links.
  • Don't require too much work - don't ask for user consent more often than necessary.
  • Don't ask awkward questions about future behavior ("always open with this application").

Use Cases

  • User has installed Web, and wants to use it to open links, instead of their current default browser.
  • User has just installed Inkscape, and always wants to use it to open SVG files.
  • ...
  • ...
  • ...

Relevant Art

GNOME 3.24

Control center default applications settings allows setting the default application for: Web, Mail, Calendar, Music, Video, Photos. Settings which affect file types change all file types of a particular category. For example: changing the video setting changes it for all video file types.

default-applications.png

The default application for specific file types can be set from the file properties dialog in Nautilus.

open-with-properties.png

User is required to use the application chooser dialog if opening an URI that: 1. doesn't have a URI handler set 2. isn't HTTP.

app-chooser.png

Device access is a one time authorization that can be revoked afterwards.

Android

Open with prompt:

http://www.androidpolice.com/wp-content/uploads/2016/01/nexus2cee_image2.png

To change permissions: Settings > Apps > Cog Icon > Default Apps

https://img.purch.com/w/755/aHR0cDovL21lZGlhLmJlc3RvZm1pY3JvLmNvbS9VL0ovNjYwNzYzL29yaWdpbmFsL3NzZGV2aWNlLTE0ODk1OTc1ODI0NDQuanBn

Opening Links includes a list of applications and the URLs they can open. For each type of link that they can open, the user can choose Opening in this app, Ask every time, and Don't open in this app.

In settings, under Apps, each app's supported links can be seen and reset.

Mac

Open with from Finder:

https://cdn2.macworld.co.uk/cmsdata/features/3656510/how-to-change-default-programs-on-mac-onetime_thumb.jpg

File properties dialog is used to change file open preferences:

https://cdn2.macworld.co.uk/cmsdata/features/3656510/how-to-change-defaults-programs-on-mac-individual_thumb.jpg

The default browser can be changed from the general settings, and the default mail app has to be changed in Mail. There's no easy way to change a URL handler, hence why 3rd party apps like RCDefaultApp exist.

Discussion

Tentative Design

Default Applications Settings

https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/default-applications/default-applications.png

Application Selection Dialog

https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/portals/app-selector.png

See Also

Design/OS/UriFileTypePermissions (last edited 2017-06-07 11:19:08 by AllanDay)