Skip to content

Commit

Permalink
fix index.ttl.acl
Browse files Browse the repository at this point in the history
  • Loading branch information
bourgeoa committed Feb 19, 2024
1 parent 998c40d commit 0ddb686
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/longChatPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ export const longChatPane = {
kb.add(newInstance, ns.dc('author'), newPaneOptions.me, newChatDoc)
}

const aclBody = (me, AppendWrite) => `
const aclBody = (me, resource, AppendWrite) => `
@prefix : <#>.
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix lon: <./>.
@prefix lon: <./${resource}>.
:ControlReadWrite
a acl:Authorization;
Expand Down Expand Up @@ -114,11 +114,11 @@ export const longChatPane = {
return new Promise((resolve, reject) => {
if (newPaneOptions.me) {
kb.fetcher.webOperation('PUT', newPaneOptions.newBase + '.acl', {
data: aclBody(newPaneOptions.me, 'Append'),
data: aclBody(newPaneOptions.me, '', 'Append'),
contentType: 'text/turtle'
})
kb.fetcher.webOperation('PUT', newPaneOptions.newBase + 'index.ttl.acl', {
data: aclBody(newPaneOptions.me, 'Write'),
data: aclBody(newPaneOptions.me, 'index.ttl', 'Write'),
contentType: 'text/turtle'
})
}
Expand Down

0 comments on commit 0ddb686

Please sign in to comment.