I want to create a new container on a Solid Inrupt Pod but with reading permissions just for my pod's friends. Nobody else can read or write data in that directory.
I've been searching and I know that I have to modify a .acl file to add permissions of reading to a current friend of mine. I share some caps:
I added uo281997 manually but I want to know how can i add it with javascript and with a list of friends. Here I share a code that creates the container but never changes the .acl permissions: Notes: friends is an array of user webIds; and webId and session of the user
async function createFriendsFolder(friends, webId, session) {
const folderUrl = webId.replace(
"/profile/card#me",
"/public/justforfriends/"
);
const folderDataset = await createContainerAt(
folderUrl,
{
fetch: session.fetch,
},
{
acl: {
read: friends,
append: [webId],
write: [webId],
control: [webId],
},
}
);
console.log("worked!");
}