> ## Documentation Index
> Fetch the complete documentation index at: https://mahalldocs.eucodes.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Platform roles

> Current screen specification: Platform roles. English and Malayalam guidance for the development team.

<Note>Source snapshot: 13 October 2026. These pages describe the current implementation, including unfinished controls. See [coverage and review notes](/reference/coverage).</Note>

<Tabs>
  <Tab title="English">
    ## Platform roles

    Host: `control.<ROOT_DOMAIN>` · Route: `/roles`

    ### Purpose and access

    Inspect platform-level permissions and assign or revoke platform access.

    You need an account session and platform access. Platform privileges are separate from tenant roles; privileged writes remain subject to endpoint role checks.

    ### Screen layout

    Platform Roles & Permissions shows role summaries and staff assignments. Assign Platform Role asks for a user and SUPER\_ADMIN, PLATFORM\_STAFF, or PLATFORM\_SUPPORT.

    ### Fields and displayed information

    Displayed table columns: **Permission**, **Identifier Key**, **SUPER\_ADMIN**, **PLATFORM\_STAFF**, **PLATFORM\_SUPPORT**, **Operator**, **Contact Email**, **Phone**, **Account Status**, **Action**.

    #### Fields and filters: Roles permissions view

    | Field / control | Reference | Input | Required marker | Choices / hints / initial values |
    | - | - | - | - | - |
    | Select User | `assign-user-select` | select | Yes | Choose a user... |
    | Platform Role | `assign-role-select` | select | Yes | SUPER\_ADMIN (Full Root Privileges), PLATFORM\_STAFF (Operations & Billing), PLATFORM\_SUPPORT (Support Mode Only); Initial: PLATFORM\_STAFF |

    ### Actions

    | Control | Result | Component |
    | - | - | - |
    | Assign Role | Opens the `is assign` view. | `roles-permissions-view.tsx` |
    | Revoke platform role | Submits the associated API change; follow the sequence and failure rules below. | `roles-permissions-view.tsx` |
    | Cancel | Closes or clears the `is assign` view/selection. | `roles-permissions-view.tsx` |
    | Grant Platform Access | Submits the associated API change; follow the sequence and failure rules below. | `roles-permissions-view.tsx` |

    ### Interaction sequence

    Assign Role → choose account and role → Grant Platform Access → refresh. Revoke sends role=null for the selected account.

    ### States and rules

    These roles apply across the control plane and do not replace tenant roles. The API restricts grant/revoke operations; the role summary is descriptive rather than an editable permission matrix.

    The rendered action controls bind loading indicators to pending state. Failed API saves keep their documented error/notification path; a loading indicator alone does not establish persistence.

    ### Implementation references

    Paths below are relative to the application repository. This is source-reviewed behavior, not a recorded browser test.

    * `apps/web/src/app/sites/control/(app)/roles/page.tsx`
    * `apps/web/src/features/platform/roles-permissions-view.tsx`

    Data and access helpers: `apps/web/src/lib/platform.ts`, `apps/web/src/lib/server-api.ts`, `apps/web/src/lib/api-client.ts`

    ### API behavior references

    * `apps/api/src/platform/platform-tenant-access.controller.ts`
    * `apps/api/src/platform/platform.controller.ts`
    * `apps/api/src/billing/plans.controller.ts`
    * `apps/api/src/billing/tenant-billing.controller.ts`
    * `apps/api/src/features/features.controller.ts`
    * `apps/api/src/features/tenant-features.controller.ts`
    * `apps/api/src/forms/forms.controller.ts`
    * `apps/api/src/analytics/analytics.controller.ts`
    * `apps/api/src/analytics/tenant-analytics.controller.ts`
  </Tab>

  <Tab title="മലയാളം">
    ## Platform roles

    Host: `control.<ROOT_DOMAIN>` · Route: `/roles`

    ### ഉദ്ദേശ്യവും പ്രവേശനവും

    Platform permissions പരിശോധിച്ച് platform access നൽകുകയോ പിൻവലിക്കുകയോ ചെയ്യുക.

    Account sessionഉം platform accessഉം വേണം. Platform privileges tenant rolesൽ നിന്ന് വേറെയാണ്; privileged writes endpoint role checksന് വിധേയമാണ്.

    ### സ്ക്രീൻ ക്രമം

    Platform Roles & Permissionsൽ role summaries, staff assignments ഉണ്ട്. Assign Platform Roleൽ user, SUPER\_ADMIN/PLATFORM\_STAFF/PLATFORM\_SUPPORT തിരഞ്ഞെടുക്കാം.

    ### ഫീൽഡുകളും പ്രദർശിപ്പിക്കുന്ന വിവരങ്ങളും

    പ്രദർശിപ്പിക്കുന്ന table columns: **Permission**, **Identifier Key**, **SUPER\_ADMIN**, **PLATFORM\_STAFF**, **PLATFORM\_SUPPORT**, **Operator**, **Contact Email**, **Phone**, **Account Status**, **Action**.

    #### ഫീൽഡുകളും ഫിൽട്ടറുകളും: Roles permissions view

    | ഫീൽഡ് / നിയന്ത്രണം | റഫറൻസ് | ഇൻപുട്ട് | നിർബന്ധ ചിഹ്നം | തിരഞ്ഞെടുപ്പുകൾ / സൂചനകൾ / ആരംഭ മൂല്യങ്ങൾ |
    | - | - | - | - | - |
    | Select User | `assign-user-select` | select | ഉണ്ട് | Choose a user... |
    | Platform Role | `assign-role-select` | select | ഉണ്ട് | SUPER\_ADMIN (Full Root Privileges), PLATFORM\_STAFF (Operations & Billing), PLATFORM\_SUPPORT (Support Mode Only); ആരംഭം: PLATFORM\_STAFF |

    ### പ്രവർത്തനങ്ങൾ

    | നിയന്ത്രണം | ഫലം | Component |
    | - | - | - |
    | Assign Role | `is assign` കാഴ്ച തുറക്കും. | `roles-permissions-view.tsx` |
    | Revoke platform role | ബന്ധപ്പെട്ട API മാറ്റം സമർപ്പിക്കും; താഴെയുള്ള പ്രവർത്തനക്രമവും പിശക് നിയമങ്ങളും കാണുക. | `roles-permissions-view.tsx` |
    | Cancel | `is assign` കാഴ്ച/തിരഞ്ഞെടുപ്പ് അടയ്ക്കുകയോ ഒഴിവാക്കുകയോ ചെയ്യും. | `roles-permissions-view.tsx` |
    | Grant Platform Access | ബന്ധപ്പെട്ട API മാറ്റം സമർപ്പിക്കും; താഴെയുള്ള പ്രവർത്തനക്രമവും പിശക് നിയമങ്ങളും കാണുക. | `roles-permissions-view.tsx` |

    ### പ്രവർത്തനക്രമം

    Assign Role → account/role → Grant Platform Access → പുതുക്കും. Revoke തിരഞ്ഞെടുത്ത accountന് role=null അയക്കും.

    ### നിലകളും നിയമങ്ങളും

    ഇവ control plane roles ആണ്; tenant rolesന് പകരമല്ല. Grant/revoke API നിയന്ത്രിക്കുന്നു; role summary വിവരണമാണ്, editable permission matrix അല്ല.

    Rendered action controls pending state അനുസരിച്ച് loading indicator കാണിക്കുന്നു. API save പരാജയപ്പെട്ടാൽ ബന്ധപ്പെട്ട error/notification കാണിക്കും; loading indicator മാത്രം persistence തെളിയിക്കുന്നില്ല.

    ### Implementation റഫറൻസുകൾ

    താഴെയുള്ള paths application repositoryയെ അടിസ്ഥാനമാക്കിയുള്ളതാണ്. Source പരിശോധിച്ച behavior ആണ്; browser test രേഖയല്ല.

    * `apps/web/src/app/sites/control/(app)/roles/page.tsx`
    * `apps/web/src/features/platform/roles-permissions-view.tsx`

    Data/access helpers: `apps/web/src/lib/platform.ts`, `apps/web/src/lib/server-api.ts`, `apps/web/src/lib/api-client.ts`

    ### API behavior റഫറൻസുകൾ

    * `apps/api/src/platform/platform-tenant-access.controller.ts`
    * `apps/api/src/platform/platform.controller.ts`
    * `apps/api/src/billing/plans.controller.ts`
    * `apps/api/src/billing/tenant-billing.controller.ts`
    * `apps/api/src/features/features.controller.ts`
    * `apps/api/src/features/tenant-features.controller.ts`
    * `apps/api/src/forms/forms.controller.ts`
    * `apps/api/src/analytics/analytics.controller.ts`
    * `apps/api/src/analytics/tenant-analytics.controller.ts`
  </Tab>
</Tabs>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.