- Source:
Methods
(async) canAppend(entry) → {boolean}
Verifies the write permission of an entry.
Parameters:
Name | Type | Description |
---|---|---|
entry |
module:Log~Entry | An entry to verify. |
- Source:
Returns:
True if the entry's identity has write permission, false otherwise.
- Type
- boolean
(async) capabilities() → {Array}
Gets the access capabilities of the OrbitDB access controller.
The returned capabilities will be a mixture of admin and write access addresses.
- Source:
Returns:
A list of ids of identities with admin and write access.
- Type
- Array
(async) close()
Close the underlying access control database.
- Source:
(async) drop()
Drop the underlying access control database.
- Source:
(async) get(capability) → {Array}
Gets a list of identities with the specified capability.
Parameters:
Name | Type | Description |
---|---|---|
capability |
string | A capability (e.g. write). |
- Source:
Returns:
One or more addresses with the spcified capability.
- Type
- Array
(async) grant(capability, key)
Grants a capability to an identity, storing it to the access control database.
Parameters:
Name | Type | Description |
---|---|---|
capability |
string | A capability (e.g. write). |
key |
string | An id of an identity. |
- Source:
(async) hasCapability(capability, key) → {boolean}
Checks whether an identity has a capability.
Parameters:
Name | Type | Description |
---|---|---|
capability |
string | A capability (e.g. write). |
key |
string | An id of an identity. |
- Source:
Returns:
True if the identity has the capability, false otherwise.
- Type
- boolean
(async) revoke(capability, key)
Revokes a capability from an identity, removing it from the access control database.
Parameters:
Name | Type | Description |
---|---|---|
capability |
string | A capability (e.g. write). |
key |
string | An id of an identity. |
- Source: