Skip to main content

Granting User Access

Creating a user#

Users can be created in the following way - we recommend inserting the following post-signup.

vc.users.create('user_id', 'customer_org_id')

Granting a permission#

Usere can be granted permissions via roles, as well as actions directly - this should be done anytime a user is granted access to a set of resources. See implicit vs explict grants.

vc.users.grant_role('user_id', 'role_id') # implicit grant
# explicit grantsvc.users.grant_role('user_id', 'role_id', 'resource_object_id', 'resource_type')vc.users.grant_action('user_id', 'action', 'resource_object_id', 'resource_type')

All Operator#

You can use VistaClient.ALL in place where resource_id or resource_type is accepted to indicate all.