5 min readUpdated Mar 2, 2026

RoleEditorModal Documentation

Overview

The RoleEditorModal component in the Vantage analytics and data platform provides an interface for creating or editing user roles within the system. It allows administrators to define role-specific permissions and settings pertaining to dashboard access, workflows, AI features, and billing management. This component is pivotal for managing user access levels and ensuring that each user has the appropriate permissions aligned with their roles.

Purpose

The main purpose of the RoleEditorModal is to facilitate the management of user roles by allowing administrators to:

Settings

The RoleEditorModal comprises several settings related to role management. Below is an exhaustive breakdown of each accessible setting.

1. Role Templates

2. Role Name

3. Role Description

4. Context

5. Permissions

6. Credit Budget

7. Budget Period

8. Overage Action

Functionality

When the RoleEditorModal component is rendered, it either opens a form for creating a new role or editing an existing one based on the isOpen prop. The modal’s state is managed via internal state management. The permissions can be toggled using checkboxes, and any changes to form input values are captured and reflected in the component’s state. Upon submitting the form, the onSave callback is triggered, passing the new or updated role data back to the parent component.

Expected Data

The data expected to be received by the RoleEditorModal includes:

Use Cases & Examples

Use Cases

  1. Creating New User Roles: An organization wants to implement a new role for content editors with specific editing permissions. The RoleEditorModal allows creating this role while selecting from a template and modifying permissions.

  2. Editing Existing Roles: A company undergoes a change in its structure and needs to alter the permissions of existing roles, such as reducing a 'Manager's' capabilities to avoid unauthorized access to sensitive data.

  3. Managing Billing and Budgeting: A finance team needs to create a role for billing managers that includes permissions for managing payment methods. The credit budget feature allows for budgeting management within these roles to avoid overspending.

Example Configuration

Use Case: Creating a new Content Editor role:

  1. Role Name: Content Editor.
  2. Description: Responsible for creating and editing content on the platform.
  3. Context: organization (default).
  4. Permissions (configured):
    • View Dashboard: true
    • Edit Dashboard: true
    • View Workflows: true
    • Edit Workflows: true
    • Export Data: true
  5. Credit Budget: 1000 (monthly).
  6. Budget Period: monthly.
  7. Overage Action: warn.

Sample Configuration Object:

json
{
  "name": "Content Editor",
  "description": "Responsible for creating and editing content on the platform.",
  "context": "organization",
  "permissions": {
    "view_dashboard": true,
    "edit_dashboard": true,
    "view_workflows": true,
    "edit_workflows": true,
    "export_data": true
  },
  "creditBudget": 1000,
  "budgetPeriod": "monthly",
  "overageAction": "warn"
}

Using this detailed guide, administrators can effectively understand and utilize the RoleEditorModal to manage user roles efficiently within the Vantage platform.