Skip to content

Team Roles

Team roles let you control which DBCode features your team members can use. Each team member is assigned a role that determines their access level. This is useful for enforcing company policies around data handling, AI usage, and information sharing.

Every team member has exactly one role. The role determines two things:

  1. Team management access - whether they can manage seats and assign roles (admin only)
  2. Feature access - which DBCode features they can use

When a feature is restricted by a role, the team member sees it as disabled with a “Restricted by your team role” message. Features are never hidden, just disabled, so there is no confusion about what is available.

DBCode includes four built-in roles that cover common configurations:

RoleTeam ManagementFeature Restrictions
adminCan manage team members and assign rolesNone (full access)
memberNo management accessNone (full access)
no-exportNo management accessData Export, Data Copy, Data Share
restrictedNo management accessAI, History Sync, Data Export, Data Copy, Data Share

Built-in roles cannot be modified or deleted. They serve as ready-made configurations for common use cases.

If the built-in roles don’t fit your needs, you can create custom roles with any combination of restrictions. Custom roles can restrict the following features:

FeatureKeyWhat It Controls
AIaiAll AI features (or restrict individually below)
AI Completionsai.completionsInline SQL completions as you type
AI Analysisai.analysisQuery explanations and execution plan analysis
AI Query Builderai.queryBuilderAI-assisted query construction
AI Exploreai.exploreAI-powered data exploration
AI Gridai.gridAI assistance in the data grid
History SynchistorySyncCloud sync of query history across devices
Data ExportdataExportExport to CSV, Excel, JSON, Parquet, and other formats
Data CopydataCopyCopy cells and rows from the data grid to clipboard
Data SharedataShareShare data and reports via shareable links

Restricting a parent feature (like AI) automatically restricts all its sub-features. You can also restrict sub-features individually if you want more granular control. For example, you might allow AI completions but restrict AI analysis.

In the Account tab, expand your license details. If you have a team subscription and are an owner or admin, you will see a Roles section listing all available roles (built-in and custom).

  1. Click the + icon next to the Roles heading
  2. A role editor will open. Enter a name for your role
  3. Uncheck the features you want to restrict
  4. Click Create
  1. Click the pencil icon next to the role you want to edit, or click the role name
  2. The role editor will open showing the current configuration
  3. Modify the name or feature restrictions as needed
  4. Click Save
  1. Click the trash icon next to the custom role you want to delete
  2. Confirm the deletion

When a custom role is deleted, any team members assigned to that role will revert to full access (equivalent to the member role).

Click any built-in role to open the role editor in read-only mode. This lets you see exactly what each built-in role restricts without being able to modify it.

To assign a role to a team member:

  1. In the Seats section, find the team member
  2. Click the shield icon next to their name
  3. Select a role from the list

The role takes effect on the team member’s next extension activation or within 12 hours (the permission refresh interval). Restarting VS Code will apply the change immediately.

Assigning a new role replaces the previous one. For example, changing someone from admin to no-export removes their team management access and adds the export restrictions.

The account owner always has full access and their role cannot be changed. The owner is the person who created the subscription.

Team roles are a policy enforcement tool designed to help organizations manage how their team uses DBCode. They prevent accidental misuse and help enforce company guidelines around data handling and AI usage.

Think of roles as the equivalent of a company policy document, but enforced automatically within the tool, rather than relying on people to remember and follow the rules.

When a feature is restricted:

  • AI features - Completions stop appearing, AI assist commands show a restriction message
  • History Sync - The sync toggle is disabled, local history continues to work normally
  • Data Export - Export menu items and commands show a restriction message
  • Data Copy - Clipboard copy from the data grid is blocked
  • Data Share - Share options show a restriction message

In all cases, the user sees “Restricted by your team role” so they understand why the feature is unavailable.

Role definitions and assignments are stored in your Stripe subscription metadata alongside your existing team seat data. No separate database or third-party service is involved. Role assignments are cached locally on each team member’s machine and refreshed every 12 hours.

If you need to restrict features not currently available in the role system, let us know at [help@dbcode.io](mailto:help@dbcode.io?subject=Restrict team features). We are actively expanding the list of features that can be managed through roles.