Open bourgeoa opened 4 years ago
I'm currently not actively contributing to solid projects. I only try to keep them working and helping other people getting on, if they have some trouble. So I won't do this in the near future (and probably not at all).
Apart from that, I don't think that (un)zipping with acl files would be a top priority. In particular, a menu for handling permissions seems more useful. For the implementation this would also be useful, as one could display the user what permissions will be granted before unzipping it.
Regarding your suggested implementation I want to note, that the spec explicitly states that we shouldn't rely on the .acl
for finding acl resources and I think this propagates to (un)zipping based on the .acl
extension. So, while this works with NSS, I don't think it's Solid spec conform (which doesn't mean it's not useful).
And I think you can rewrite ...Object.entries(folderData.links).map(([type, item]) => item)
to ...Object.values(folderData.links)
Can you add to your app zip with acl and unzip with validity control for acl.
I took inspiration from your work to implement zip/unzip in
solid-ide
. I improved the functions so as tozip with acl
andunzip with validity control for acl
zip with acl
is done with the followingthis.aclControl = async (path, itemName, content, s, p ,o) => { try { // find acl block for an agent const aclControl = await fc.rdf.queryTurtle(path+itemName,content, s, { acl: 'mode'}, { acl : 'Control' }) //s, p, o) if(!aclControl.length) { return self.err = 'noControl' }
}) } catch( err) { self.err = err return 'incorrect rdf' } return 'acl' //self.updateFile(path, itemName, content, contentType).catch(err => self.err = err) }