Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Infiniflow Ragflow Admin RoleForm Component

From Leeroopedia
Knowledge Sources
Domains Frontend, Admin
Last Updated 2026-02-12 06:00 GMT

Overview

Role creation and editing form component with a dynamic permissions grid for assigning granular access controls.

Description

The admin/forms/role-form.tsx component renders a form for creating or editing roles. It includes a role name field and a dynamic permissions grid that displays all available permissions grouped by category, with checkboxes for toggling individual permissions. The grid dynamically updates based on available permission definitions fetched from the backend.

Usage

Used within the roles page as a dialog form for creating new roles or editing existing role definitions.

Code Reference

Source Location

Signature

export default function RoleForm(): JSX.Element;

Import

import RoleForm from '@/pages/admin/forms/role-form';

I/O Contract

Inputs

Name Type Required Description
role undefined No Existing role data for edit mode; undefined for create mode
onSubmit (role: Role) => void Yes Callback with submitted role data

Outputs

Name Type Description
Rendered component JSX.Element Role form with dynamic permissions grid

Usage Examples

<RoleForm role={selectedRole} onSubmit={handleSaveRole} />

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment