Arquisoft / viade_en3a

Viade En3A
https://arquisoft.github.io/viade_en3a/
1 stars 4 forks source link

Try to use *.ACL files to programatically change permissions inside POD #148

Closed fincamd closed 4 years ago

fincamd commented 4 years ago

Manage permissions with route sharing thingies.

jesQM commented 4 years ago

https://github.com/Otto-AA/solid-acl-utils

This library may help to do the job

jesQM commented 4 years ago

Just made a simple demonstration of the use of the library over here: 817a754535766a03d74fec3633bf4fd4632a13d1

(It has hardcoded stuff regarding my profile, so those things should be changed according to yours for it to work with your session)

Although the library is in a beta stage, it seems to work correctly, nevertheless, it seems its just a cover for the real library: https://github.com/Otto-AA/solid-acl-parser However, the acl parser requires some knowledge of turtle format (which I have no idea), so, unless I require something which im not able of doing with the beta library, there is no need to use the parser.

jesQM commented 4 years ago

Just found an inconvenient. By default the files we create "inherit" permissions from parent's acls, meaning a file may not have a .acl, so, if you try to edit or access it, you are presented with a 404 which does not allow you to apply changes.

There is an example of the creator of the library which, after some testing, seems to bypass this problem, however, as the example's code is obfuscated im not sure if there is a specific functions which is helping out or what.

Will try to solve it.

Edit - ye, I was looking at the wrong js script, thats why I couldn't read a thing

jesQM commented 4 years ago

Just asked Otto to check whether he can enbrighten me: https://github.com/Otto-AA/solid-acl-utils/issues/5

jesQM commented 4 years ago

He answered pretty fast, and after some testing it does work now, however, will implement whatever I have left of the interface and close the issue when finished.