Sorry, I hope this will be more understandable. If not just ask again :))
If you want to share the file with your own UI you will need to modify .acl files to change the permissions. For that your app would need Control permissions.
Currently this means that the app gets full control over the pod and could also completely take it over, therefore (1) users should (and hopefully will) be more cautious giving these permissions and (2) your app should be safe and trustworthy. There’s also a possibility to grant apps permissions only per file/folder, but that is in an “experimental” status and will somehow change in the future.
So my advise would be that you don’t change the permissions yourself. Instead you forward the user to another app, where they can select what files they share with whom. For example, tell them to use the data browser (or Solid Share which is a PoC I’ve made that should work, but I don’t actively maintain it).
In your case this could mean:
- user 1 wants to share files with user 3 and 4
- your app tells user 1 how s_he can do that with another app
2.1. tell the user the urls of the files
2.2. tell the user the webIds
2.3. tell the user to set the appropriate permissions (for databrowser, go to the containing folder -> open the file -> click on the sharing icon -> set specific sharing -> green plus -> person -> enter webId -> drag person to desired permissions)
2.4. wait until user is finished
- notify user 3 and 4 that they have access to the file
The advantages of this are:
- no control access required for your app
- user can share files with their preferred and trusted app
- a sharing app could have a good UI for that, as it specializes on it
- currently a bit inconvenient to change permissions with the databrowser (imo)
- user has to leave the app
An alternative way would be to that the user grants permissions to a group file (list of persons). Then you could add or remove people from this group file and with that change who has access to the mp3 files. For that only Write is needed. But the user would still have to initially create these group files. (And probably has some more caveats)
In the future there possibly will be a standard way to request permissions for files. For instance the app could take a look at the user profile for a sharing-app, and then open this app in a popup with some queryParameters to indicate what you would want to share with whom. The user then can confirm it in the Sharing-App, close it and it’s done. That would be a much better UX in my opinion, hope it will come in the future :))
And of course you could also ask for Control permissions, which will probably be more user friendly in the short term. In the long term I think this will be the wrong solution