5 min readUpdated Mar 2, 2026

RoleEditorModal Documentation

Purpose

The RoleEditorModal is a component used in the Vantage analytics and data platform to create and edit user roles. It allows administrators to assign specific permissions, define budget constraints, and set role-based access for users on the platform. This component helps ensure that users have the appropriate access to features and capabilities based on their organizational role.

Settings

The RoleEditorModal component has several settings, which are categorized into various groups. Below are the detailed explanations of all settings:

1. Role Name

2. Description

3. Permissions

Permission Options

These options are detailed as follows:

4. Credit Budget

5. Budget Period

6. Overage Action

How It Works

The RoleEditorModal operates as follows:

  1. Initialization: The modal is initialized with a default role or an existing role's details when opened. If no role is provided, it initializes with empty fields.
  2. User Input: The user can modify the role name, description, permissions, credit budget, budget period, and overage action.
  3. Permission Handling: The component contains a handler function to manage changes in permissions—checking or unchecking boxes updates the state accordingly.
  4. Submission: When the user clicks on the "Save Changes" button, it triggers the onSave callback with the complete form data. This includes all changes made in the role's configuration.
  5. Modal Display: The modal remains hidden if isOpen is false.

Use Cases & Examples

Use Case 1: Creating a New Role for Data Analysts

An organization wishes to enhance its analytical capabilities by creating a new role specifically for data analysts with certain permissions for building dashboards and exporting data.

Use Case 2: Modifying an Existing Manager Role

A company decides to update its existing manager role to restrict access to sensitive integrations while maintaining the ability to manage users and workflows.

Use Case 3: Budget Management for Billing Managers

To improve financial management, the organization needs to assign a budget to its billing manager role, preventing excessive spending while still allowing access to billing functionalities.

Detailed Example Configuration for Use Case 1

To configure the RoleEditorModal for creating a new role intended for Data Analysts, the following settings might be applied:

json
{
    "name": "Data Analyst",
    "description": "Role to handle all analytics and dashboard capabilities.",
    "context": "organization",
    "permissions": {
        "view_dashboard": true,
        "edit_dashboard": true,
        "view_workflows": true,
        "edit_workflows": true,
        "export_data": true,
        "aiEnabled": true
    },
    "creditBudget": 2000,
    "budgetPeriod": "monthly",
    "overageAction": "warn"
}

In this example, the Data Analyst role is configured to provide significant analytics capabilities while enforcing budget constraints to manage costs effectively.