Skip to content

Commit

Permalink
update aclParser
Browse files Browse the repository at this point in the history
  • Loading branch information
bourgeoa committed Mar 28, 2021
1 parent 9795e6c commit 9c49c86
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 120 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,14 @@ let content = await fc.aclUrlParser(url)
```
example 2 :
```javascript
// create a rule
// create a block rule
let aclUsers = await fc.acl.addUserMode({}, [{ agentClass: 'Agent' }], ['Read'])
// add an other rule
// add an other rule in the block rule
aclUsers = await fc.acl.addUserMode(aclUsers, [{ agent: 'https://example.solid.community/profile/card#me' }], ['Read', 'Write', 'Control'], ['accessTo'])

// build the aclContent
const aclContent = await fc.acl.createContent('https://example.solid.community/public/text.txt', aclUsers)
const aclBloks = [aclUsers] // array of block rules
const aclContent = await fc.acl.createContent('https://example.solid.community/public/text.txt', aclBloks)
console.log('build an aclContent ' + aclContent)


Expand Down
8 changes: 4 additions & 4 deletions docs/JSdoc/aclParser.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ using an aclAgents object
**Kind**: global class

* [solidAPI.acl](#solidAPI.acl)
* [.contentParser(url, aclcontent)](#solidAPI.acl+contentParser) ⇒ <code>object</code>
* [.contentParser(url, aclcontent)](#solidAPI.acl+contentParser) ⇒ <code>object</code> \| <code>array</code>
* [.createContent(url, aclAgents, options)](#solidAPI.acl+createContent) ⇒ <code>string</code>
* [.addUserMode(aclAgents, userAgent, userMode, userAccess)](#solidAPI.acl+addUserMode) ⇒ <code>object</code>
* [.deleteUserMode(aclAgents, userAgent, userMode, userAccess)](#solidAPI.acl+deleteUserMode) ⇒ <code>object</code>
Expand All @@ -58,11 +58,11 @@ using an aclAgents object

<a name="solidAPI.acl+contentParser"></a>

### solidAPI.acl.contentParser(url, aclcontent) ⇒ <code>object</code>
### solidAPI.acl.contentParser(url, aclcontent) ⇒ <code>object</code> \| <code>array</code>
aclcontent parser

**Kind**: instance method of [<code>solidAPI.acl</code>](#solidAPI.acl)
**Returns**: <code>object</code> - aclAgents
**Returns**: <code>object</code> \| <code>array</code> - aclAgents Object or Array of Objects

| Param | Type | Description |
| --- | --- | --- |
Expand All @@ -80,7 +80,7 @@ create turtle aclcontent for url resource from aclAgents object
| Param | Type | Description |
| --- | --- | --- |
| url | <code>string</code> | ressource (not url.acl) |
| aclAgents | <code>object</code> | |
| aclAgents | <code>object</code> \| <code>array</code> | object or Array of objects |
| options | <code>object</code> | for isValidAcl() |

**Properties**
Expand Down
2 changes: 1 addition & 1 deletion docs/JSdoc/rdf-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using solid-namespace to access namedNode, literal

### solidAPI.rdf.cache : <code>Object.&lt;string, N3.N3Store&gt;</code>
cache of N3.store : cache[url] is the store of url
example :
example :
- to add a quadsArray to the store : cache[url].addQuads(quadsArray)
- all N3 store functions can be used

Expand Down
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "solid-file-client",
"version": "1.2.3",
"version": "1.2.4",
"description": "A library for creating and managing files and folders in Solid data stores",
"author": "Jeff Zucker",
"maintainer": "Alain Bourgeois",
Expand Down Expand Up @@ -76,8 +76,8 @@
},
"dependencies": {
"jszip": "^3.2.2",
"mime": "^2.4.4",
"n3": "^1.3.5",
"solid-namespace": "^0.4.0"
"mime": "2.5.2",
"n3": "^1.9.0",
"solid-namespace": "^0.5.0"
}
}
Loading

0 comments on commit 9c49c86

Please sign in to comment.