Permission Management for Flatpak Apps in Discover
Flatpak applications can have access to sockets, buses, filesystems etc. Permissions to access these resources and features, however, are not shown on Discover's interface, presently. This project aims to display these permissions on the interface, and allow the user to edit them in using a KCM.
The merge request can be found here
The first week, between January 24th to 31st, started off with an introductory meeting with my mentors, in which we created a brief outline of how to tackle the work ahead. I created a button to print the permissions to the console, and spent some time learning QML and exploring the codebase. The permissions were printed using a system command.
This period was spent using the libflatpak API to store the permissions in data structures within the flatpak backend, and printing them to the console. Subsequently, they were printed to a popup.
In these 3 weeks, the work on the C++ side of things involved implementing a class for storing the permissions that would hold the name, icon, description etc of the permission; and subclassing a QAbstractListModel to interface between the permissions and the QML interface.
The frontend involved shifting the list of permission names from the popup to the application page, and experimenting with some design choices. Some time was also spent in showing more information in these permissions, in addition to the name, such as a description and a list of specific accesses they enjoy.
There was also a helpful discussion with the VDG, on the right approach to designing the KCM.
The two weeks witnessed tying up of loose knots, such as selecting and adding appropriate icons for each permission, and responding to reviews on the merge request. This included change in sizing, improving the permission descriptions to make them more understandable, and replacing UI components with more appropriate ones.
I also added a link button in the "metadata" section of the application page.
As we approach the end of the SoK, I hope to finish the work on the Discover interface. In specific, this would involve having a more understandable and aesthetic way of listing directories and buses than just adding names to a popup. I would also try to lay some groundwork for the KCM, even though I wouldn't be able to finish it.