Replies: 3 comments 13 replies
-
The proposal has been updated:
The changes can be known using the “edited” button. |
Beta Was this translation helpful? Give feedback.
-
I'm not familiar with the process for proposals here, is this something that is being worked on? What needs to happen so it gets worked on? Beyond that I have some questions, I'm from the perspective of a freecad user/dev trying to understand if links can eventually work with the desktop portal. Currently our flatpak app just has host permissions to wrokaround this.
what if a linked file also links to other files? This is common in freecad projects. The app would need to read the linked file before knowing it links to other files so it will need to make more than one request to get all the linked files it needs, I don't think secondary requests should be automatically refused, in any case the user could be prompted (and given the option to accept all requests)
If a time limit will be imposed I hope it's a relatively long one or that there is still the possibility of requesting access with a prompt for the user if the time has passed. CAD files can get pretty big and therefore slow to open in big projects, although I'm not sure if links are read and requested early. Considering the case of linked files linking others I mentioned before I think the timer should be reset after the first level of linked files is accessed. Would this also allow access to files in sub-directories in the same location? This is also common in FreeCAD projects and if I'm being honest any arbitrary relative path from the file is a common thing, can we think about allowing arbitrary relative paths? We can think about prompting the user whenever the app request files in a different directory.
we could be smart about this, an app requesting a bunch of files of the same extension as the opened file is not so suspicious, the files could be grouped by extensions and the interface could have more highlight to specially suspicious requests like scripts, dot files and directories or anything deemed sensitive |
Beta Was this translation helpful? Give feedback.
-
Yes. An Inform XYZ.materials folder may have a .gitignore file inside it, which is autogenerated by the Inform compiler. |
Beta Was this translation helpful? Give feedback.
-
Note: This proposal currently does not apply to files with links to files from different directories. It can be opened for those if there is no problem doing so (e.g. for security reasons).
Goal
The goal is to allow apps to request access to a set of files (i.e. multiple files at once) after opening a file requiring it. The opened file and requested files are all in the same directory.
Requirements
Portal
Fileset Request
Example file list:
Apps
Functioning
Note: The following text is for understanding purposes only. Things can be done differently if wanted; only the end results are important.
Checks and their values:
To begin, the user opens a file containing links to other files (which are in the same directory) with the file manager, the file chooser, drag and drop, or the
open-fileset
method (see below). Then the portal performs check (1). If this check has the value "no", the portal returns the file opened by the user to the app. However, if it has the value "yes", the portal returns the file to the app and performs check (2).The app parses the file opened by the user and makes its request for a set of files within the time limit imposed by check (2). If check (2) has the value "no", meaning the app has not made its request within the specified time limit, the portal denies this request. If check (2) has the value "yes", which means that the app request was made within the time limit, the portal performs check (3a).
With check (3a) having the value "no", the portal denies this fileset request. If this check has the value "yes", then the portal does check (3b).
If check (3b) has the value "no", the portal denies the request. However, if this check has the value "yes", then the portal does checks (4a) and (4b) at the same time.
Finally, the portal has one of the following behaviors depending on the values of checks (4a) and (4b), classified according to the values of check (4a).
When (4a) is "none", and:
When (4a) is "some", and:
When (4a) has "all", and:
When the Request Is Suspicious Or Automatically Denied
In case there is something suspicious or the app request was automatically denied, the dialog box can also suggest actions to take, such as checking if the file contains links to the requested files (if it is readable by a text editor), checking with another file in case the open one has been modified with another app or by another process, uninstalling the app, and any other relevant actions that can be taken.
Approved Request and Files Added After Request
When a valid fileset request is approved by the user, any file from this request and added after this request has its access permission marked as "locked" by the portal.
Note that files with "locked" permission can be opened independently of any fileset request.
Open Fileset Method
The
open-fileset
method allows to perform a fileset request for any file the app has access to.Delay Before Responding
A delay during which the user cannot deny or approve a request is written into the portal code. This delay is the minimum time required for a user to read a filename multiplied by the number of files requested, plus the minimum time required to read a folder name multiplied by the total number of folders involved in the request (e.g., if there are the folders "folders -1", "folder-2" and "folder-1/folder-3", there are 3 folders). This delay is limited to valid requests for which a dialog box is displayed to approve or deny them.
Portal User Interface With Portal Code
This involves having a transaction between the portal UI and the portal code to present the files to the user in the portal UI. This allows (in part) to create the same type of user experience across different desktop environments.
Here are a few suggestions, which can be combined:
The functioning is as follows when using multiple setup pages:
Waiting Window
Each time a request is made, including when opening files without user intervention, use of the app UI is blocked due to request processing. For this, a small window displaying a short message, like "Processing fileset request..." with the name of the file that "triggered" the request, might be displayed before showing the result of the request. The display time of this window must be sufficient, without being too long, for the user to perceive the message. The transition between the wait window and the request result should be smooth. The blocking is stopped when the files are returned to the app.
I recommend doing this because it would let the user know something is happening every time.
Additionally, one option for apps might be added:
Recommendations for App Developers
Multiple Requests
For each request, the above functioning applies. As such, it is recommended, if possible, to trigger a request using the
open-fileset
method when the user opens a file (e.g. double-click a file in the app UI). Chaining requests (i.e. to perform requests directly one after the other) should be avoided.Links To Files Not Requiring Direct Access
This is, for example, the case for external attachments to PDF files. In such cases, it might be better to use the OpenURI portal ("Open with") rather than using this one.
If this is not the case, it is necessary for the OpenURI portal to support the opening of files that the app does not have access to and which are within the same directory. This opening should always be explicitly approved or denied by the user. Note that it is better to have this at the same time as the Fileset Request portal.
Notes
This could be cumbersome for the user:
Questions
Beta Was this translation helpful? Give feedback.
All reactions