Access Groups
Methods for accessing and managing access groups
AccessGroupManagers
Get a list of addresses of managers of the specified group
Returns: List of manager addresses
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contractAddress | ✓ | The address of the access group contract |
AccessGroupMembers
Get a list of addresses of members of the specified group
Returns: List of member addresses
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contractAddress | ✓ | The address of the access group contract |
AccessGroupOwner
Returns the address of the owner of the specified content object
Returns: The account address of the owner
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ |
AddAccessGroupManager
contractAddress,
memberAddress
}) → Promise.<string>
Add a manager to the access group at the specified contract address. This client's signer must be a manager of the access group.
Returns: The transaction hash of the call to the grantManagerAccess method
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contractAddress | string | ✓ | Address of the access group contract |
memberAddress | string | ✓ | Address of the manager to add |
AddAccessGroupMember
contractAddress,
memberAddress
}) → Promise.<string>
Add a member to the access group at the specified contract address. This client's signer must be a manager of the access group.
Returns: The transaction hash of the call to the grantAccess method
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contractAddress | string | ✓ | Address of the access group contract |
memberAddress | string | ✓ | Address of the member to add |
AddContentLibraryGroup
libraryId,
groupAddress,
permission
})
Add accessor, contributor or reviewer permissions for the specified group on the specified library
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ | The ID of the library |
groupAddress | string | ✓ | The address of the group |
permission | string | ✓ | The type of permission to add ("accessor", "contributor", "reviewer") |
AddContentObjectGroupPermission
objectId,
groupAddress,
permission
})
Add a permission on the specified group for the specified object or content type
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | ✓ | The ID of the object |
groupAddress | string | ✓ | The address of the group |
permission | string | ✓ | The type of permission to add ("see", "access", "manage") |
ContentLibraryGroupPermissions
libraryId,
permissions // optional
}) → Promise.<Object>
List all of the groups with permissions on the specified library.
Returns: Object mapping group addresses to permissions, as an array Example: { "0x0": ["accessor", "contributor"], ...}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ | The ID of the library* @param {string} libraryId - The ID of the library |
permissions | Array.<string> | Limit permission types. If not specified, all permissions will be included |
ContentObjectGroupPermissions
List all of the groups with permissions on the specified object or content type
Returns: Object mapping group addresses to permissions, as an array Example: { "0x0": ["see", "access", "manage"], ...}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | ✓ | The ID of the object |
CreateAccessGroup
name, // optional
description, // optional
meta // optional
}) → Promise.<string>
Create a access group
A new access group contract is deployed from the content space
Returns: Contract address of created access group
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Name of the access group | |
description | string | Description for the access group | |
meta | object | Metadata for the access group |
DeleteAccessGroup
NOT YET SUPPORTED - Delete an access group
Calls the kill method on the specified access group's contract
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contractAddress | string | ✓ | The address of the access group contract |
LinkAccessGroupToOauth
groupAddress,
kmsId,
oauthConfig
)
Link the specified group to an OAuth provider with the specified credentials
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
groupAddress | string | ✓ | The address of the group |
kmsId | string | ✓ | The ID of the KMS (or trust authority ID) |
oauthConfig | string | Object | ✓ | The configuration for the OAuth settings |
ListAccessGroups
Retrieve a list of all available access groups
Returns: List of access groups
RemoveAccessGroupManager
contractAddress,
memberAddress
}) → Promise.<string>
Remove a manager from the access group at the specified contract address. This client's signer must be a manager of the access group.
Returns: The transaction hash of the call to the revokeManagerAccess method
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contractAddress | string | ✓ | Address of the access group contract |
memberAddress | string | ✓ | Address of the manager to remove |
RemoveAccessGroupMember
contractAddress,
memberAddress
}) → Promise.<string>
Remove a member from the access group at the specified contract address. This client's signer must be a manager of the access group.
Returns: The transaction hash of the call to the revokeAccess method
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contractAddress | string | ✓ | Address of the access group contract |
memberAddress | string | ✓ | Address of the member to remove |
RemoveContentLibraryGroup
libraryId,
groupAddress,
permission
})
Remove accessor, contributor or reviewer permissions for the specified group on the specified library
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ | The ID of the library |
groupAddress | string | ✓ | The address of the group |
permission | string | ✓ | The type of permission to remove ("accessor", "contributor", "reviewer") |
RemoveContentObjectGroupPermission
objectId,
groupAddress,
permission
})
Remove a permission on the specified group for the specified object or content type
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | ✓ | The ID of the object |
groupAddress | string | ✓ | The address of the group |
permission | string | ✓ | The type of permission to remove ("see", "access", "manage") |
UnlinkAccessGroupFromOauth
Disable the OAuth linking on the specified access group
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
groupAddress | string | ✓ | The address of the group |