solvebio-python
solvebio-python copied to clipboard
Add support for VaultUser and VaultGroup permissions resources
The client currently supports the Vault resource but does not allow easy maintenance of permissions. The API has the following resources:
- VaultUser (/v2/vaults/<ID>/users)
- VaultGroup (/v2/vaults/<ID>/users)
- VaultCollaborator (/v2/vaults/<ID>/collaborators)
- A read-only view that shows all users with access to a vault, as well as their permission level
Proposal: add the following methods:
- Vault.users() -> returns a list of VaultUser objects
- Vault.add_user(user_id, role='read')
- Vault.groups() -> returns a list of VaultGroup objects
- Vault.add_group(group_id, role='read')
- Vault.collaborators() -> returns a list of VaultCollaborator objects
This was requested today for use in syncing permissions to a third-party system (specifically NGB)