Jump to content

SoK/2022/StatusReport/Suhaas Joshi

From KDE Community Wiki

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.

Present Status

The merge request can be found here

Timeline

Week 1

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.

Weeks 2-4

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.


Weeks 5-7

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.

Weeks 8-9

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.

Plans Ahead

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.