Access control
Organization access control
When you set up your PlanetScale account, you're asked to create an Organization.
An organization is essentially a container for your databases, settings, and members. You can create multiple organizations in the same account for different applications or use cases.
Within each organization, you can add members and assign them different roles. This document covers the different roles, the ways you can assign roles, permissions associated with those roles.
Roles and permissions
We currently support three different roles in your organization:
Organization Administrator
Organization Member
Database Administrator
Organization Administrator
An Organization Administrator
can perform all actions in an organization, as well as all actions on every database within that organization.
Organization Member
An Organization Member
can only perform limited actions within an organization and on all databases in that organization. By default, all users added to an organization have this role.
Database Administrator
A Database Administrator
can perform all actions on the database for which they were assigned the Databases Administrator
role.
This role is assigned at the database level and gives elevated permissions for the particular database that an organization member is the Database Administrator
of. If you want to grant a member full access to manage one or several databases but not full Organization Administrator
access, then this is the role you want. Please note, a user that is granted this role must be a member of the organization of which the database exists in, so they will have the permissions associated with Organization Member
as well.
Organization-level permissions
Each role has a set of permissions assigned to it, which determines what actions that role is allowed to take within an organization or database.
The following table describes permissions assigned at the organization level for Organization Administrators
and Organization Members
. Because Database Administrators
don't have any organization-level permissions, they are not included in this table.
Action | Description | Member | Administrator |
---|---|---|---|
View branches | View a database branch | ✔ | ✔ |
Create branches | Create a database branch | ✔ | ✔ |
Delete non-production branches | Delete a non-production database branch | ✔ | ✔ |
View databases | View one or all databases | ✔ | ✔ |
Create databases | Create a new database | ✔ | ✔ |
Create deploy requests | Create a deploy request for a branch | ✔ | ✔ |
Manage service tokens | Create, view, or delete service tokens | ✔ | ✔ |
Manage service token grants | Create, view, update, or delete service token grants | ✔ | ✔ |
View organization members | View one or all organization members | ✔ | ✔ |
View database members | View one or all database members | ✔ | ✔ |
View organization | View an organization | ✔ | ✔ |
View query statistics | View query statistics for an organization's databases | ✔ | ✔ |
Connect to development branches | Create passwords or use pscale shell for development branches | ✔ | ✔ |
Connect to production branches | Create passwords or use pscale shell for production branches | ✔ | |
Delete production branches | Delete a production database branch | ✔ | |
Promote branches | Promote a branch to production | ✔ | |
Modify VSchema | Edit the VSchema of a keyspace | ✔ | |
Manage databases | Delete, update settings, or import a database | ✔ | |
Manage beta features | Opt-in or opt-out of a beta feature | ✔ | |
Create production service token grants | Create a service token grant to connect or delete a production database branch | ✔ | |
Update an integration | Update a third-party integration | ✔ | |
Manage invitations | View, create, or cancel organization invitations | ✔ | |
Manage invoices | View or download organization invoices | ✔ | |
Manage billing | View or update billing plans and payment methods | ✔ | |
View audit logs | View all audit logs | ✔ | |
Manage organization members | Update member roles or delete organization members | ✔ | |
Manage database members | Update member roles, add, or remove database members | ✔ | |
Manage organization | Update organization settings, SSO, or delete organization | ✔ |
Database-level permissions
The following table describes the permissions assigned at the database level for Organization Administrators
, Organization Members
, and Database Administrators
.
For Organization Administrators
and Organization Members
, these permissions apply to every database in the organization. Because the Database Administrator
role is assigned at the database level, the permissions are for the specific database(s) for which they have the Database Administrator
role.
Action | Description | Member | Administrator |
---|---|---|---|
Create and view branches | Create or view a database branch | ✔ | ✔ |
Delete non-production branches | Delete a non-production branch of a specific database | ✔ | ✔ |
View database | View a database in an organization | ✔ | ✔ |
Create deploy requests | Create a deploy request for a branch on a specific database | ✔ | ✔ |
View database members | View one or all database members | ✔ | ✔ |
View query statistics | View query statistics for an organization's databases | ✔ | ✔ |
Restore non-production backups | Restore the backup of a development branch | ✔ | ✔ |
Connect to development branches | Create passwords or use pscale shell for development branches | ✔ | ✔ |
Connect to production branches | Create passwords or use pscale shell for production branches |