A Javascript library for creating and managing files and folders in Solid data stores
Class for working with ACL using an aclAgents object
const aclModes = ['Read', 'Append', 'Write', 'Control']
const aclAccesses = ['accessTo', 'default']
const aclPredicates = ['agent', 'agentClass', 'agentGroup', 'origin', 'default']
aclObject is a string, aclPredicates related :
Check if a user or everybody has an auth
Class for working with ACL using an aclAgents object
Kind: global class
object
| array
string
object
object
object
| array
aclcontent parser
Kind: instance method of solidAPI.acl
Returns: object
| array
- aclAgents Object or Array of Objects
Param | Type | Description |
---|---|---|
url | string |
resource |
aclcontent | string |
of url.acl |
string
create turtle aclcontent for url resource from aclAgents object
Kind: instance method of solidAPI.acl
Returns: string
- text/turtle aclContent
Param | Type | Description |
---|---|---|
url | string |
ressource (not url.acl) |
aclAgents | object | array |
object or Array of objects |
options | object |
for isValidAcl() |
Properties
Name | Type | Description |
---|---|---|
‘may’ | options.aclDefault |
(‘must’ is more prudent) |
‘Control’ | options.aclMode |
|
if | options.URI |
used check that at least this URI has ‘Control’ |
object
modify aclAgents object by adding agents and/or modes and/or access types
Kind: instance method of solidAPI.acl
Returns: object
- aclAgents
Param | Type | Description |
---|---|---|
aclAgents | object |
|
userAgent | array |
array of objects { aclPredicate: aclObject } |
userMode | array |
[‘Read’] |
userAccess | array |
Properties
Name | Type | Description |
---|---|---|
default | userAccess |
value [‘accessTo’, ‘default’] |
object
modify aclAgents object by removing agents and/or modes
Kind: instance method of solidAPI.acl
Returns: object
- aclAgents
Param | Type | Description |
---|---|---|
aclAgents | object |
|
userAgent | array |
array of objects { aclPredicate: aclObject } |
userMode | array |
[‘Read’] |
userAccess | array |
[‘accessTo’, ‘default’] |
Make aclContent relative to url resource
Kind: instance method of solidAPI.acl
Param | Type | Description |
---|---|---|
aclcontent | string |
|
itemUrl | string |
resource url (not an url.acl) |
toName | string |
destination name (‘’ or file name) |
options | object |
for agent |
check that atleast an agent type has control and that the acl is well-formed URI is usually the webId checked to have ‘Control’ authorization aclDefault: ‘may’ (spec compliant), if ‘must’ then one acl: Default is needed for folder ACL aclAuth ‘must’ : spec compliant acl: Authorization is mandatory
Kind: instance method of solidAPI.acl
Result: object
{ err: [blocking errors], info: [non blocking anomalies]}
Param | Type |
---|---|
itemUrl | string |
content | string |
options | object |
Properties
Name | Type |
---|---|
‘Control’ | options.aclMode |
‘must’ | options.aclAuth |
‘may’ | options.aclDefault |
is valid RDF (parses with N3.js)
Kind: instance method of solidAPI.acl
Param | Type |
---|---|
itemUrl | string |
content | string |
options | object |
Properties
Name | Type | Description | |
---|---|---|---|
default | options.baseIRI |
to itemUrl | |
none | ‘text/n3’ | options.format |
const aclModes = [‘Read’, ‘Append’, ‘Write’, ‘Control’]
const aclAccesses = [‘accessTo’, ‘default’]
const aclPredicates = [‘agent’, ‘agentClass’, ‘agentGroup’, ‘origin’, ‘default’]
aclObject is a string, aclPredicates related :
Check if a user or everybody has an auth
Kind: global function
Param | Type |
---|---|
itemUrl | string |
aclContent | string |
options | object |
Properties
Name | Type | Description |
---|---|---|
‘Control’ | options.aclMode |
by default |
check | options.URI |
for ‘Control’ for a single URI : person, group, …. |
Kind: global function
Param | Type |
---|---|
itemUrl | string |
aclContent | string |
options | object |