chat-pane 2.4.23-d4d21f8f → 2.4.23-d8f86fc6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79283,6 +79283,31 @@ const longChatPane = {
79283
79283
  kb.add(newInstance, ns.dc('author'), newPaneOptions.me, newChatDoc)
79284
79284
  }
79285
79285
 
79286
+ const aclBody = (me) => `
79287
+ @prefix : <#>.
79288
+ @prefix acl: <http://www.w3.org/ns/auth/acl#>.
79289
+ @prefix foaf: <http://xmlns.com/foaf/0.1/>.
79290
+ @prefix lon: <./>.
79291
+
79292
+ :ControlReadWrite
79293
+ a acl:Authorization;
79294
+ acl:accessTo lon:;
79295
+ acl:agent <${me.uri}>;
79296
+ acl:default lon:;
79297
+ acl:mode acl:Control, acl:Read, acl:Write.
79298
+ :Read
79299
+ a acl:Authorization;
79300
+ acl:accessTo lon:;
79301
+ acl:agentClass foaf:Agent;
79302
+ acl:default lon:;
79303
+ acl:mode acl:Read.
79304
+ :ReadAppend
79305
+ a acl:Authorization;
79306
+ acl:accessTo lon:;
79307
+ acl:agentClass acl:AuthenticatedAgent;
79308
+ acl:default lon:;
79309
+ acl:mode acl:Read, acl:Append.`
79310
+
79286
79311
  return new Promise(function (resolve, reject) {
79287
79312
  updater.put(
79288
79313
  newChatDoc,
@@ -79300,6 +79325,18 @@ const longChatPane = {
79300
79325
  }
79301
79326
  }
79302
79327
  )
79328
+ // newChat container authenticated users Append only
79329
+ .then((result) => {
79330
+ return new Promise((resolve, reject) => {
79331
+ if (newPaneOptions.me) {
79332
+ kb.fetcher.webOperation('PUT', newPaneOptions.newBase + '.acl', {
79333
+ data: aclBody(newPaneOptions.me),
79334
+ contentType: 'text/turtle'
79335
+ })
79336
+ }
79337
+ resolve(newPaneOptions)
79338
+ })
79339
+ })
79303
79340
  })
79304
79341
  },
79305
79342