You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 13, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 13, 2022. It is now read-only.
addPermission() is undefined on the response from createContainer() #133
The current API for what you're describing (let's say, creating a container called notes and setting a "public read" permission on it) would be something like:
client.createContainer('notes').then(response=>{returnclient.getPermissions(response.url)}).then(acls=>{returnacls.addPermission(solid.acl.EVERYONE,solid.acl.READ)// other .addPermission calls here.save()}).then(response=>{// permissions modified.})
Is your proposal here to add methods to the SolidResponse class that would enable you to call response.addPermission() directly, without having to getPermissions() beforehand?
Activity
dmitrizagidulin commentedon Nov 21, 2016
Hi Ariel, thanks for opening the issue!
The current API for what you're describing (let's say, creating a container called
notesand setting a "public read" permission on it) would be something like:Is your proposal here to add methods to the
SolidResponseclass that would enable you to callresponse.addPermission()directly, without having togetPermissions()beforehand?AMWJ commentedon Nov 21, 2016
@deiu indicated lacking this feature was a bug, although I may have misunderstood.
Incidentally, I tried following the flow you described, but getPermissions didn't succeed in finding the acl files for the newly created container.
dmitrizagidulin commentedon Nov 21, 2016
Ah, right, so, since one has just created the container, there wouldn't be a permission file for it.
We should probably make this series of steps easier on the developer. And implement a convenience factory method, so you could do something like:
dmitrizagidulin commentedon Nov 22, 2016
OK, so this depends on PR #129 being merged. Stand by.