Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.modelence.com/llms.txt

Use this file to discover all available pages before exploring further.

API Reference / modelence / server / RoleDefinition
RoleDefinition = object
Defined in: packages/modelence/src/auth/types.ts:88 Defines a role that can be assigned to users. Roles are registered via the roles option in AppOptions and are synced to the Modelence Cloud dashboard for user management.

Example

import { startApp } from 'modelence/server';

startApp({
  roles: {
    admin: { description: 'Full access to all features' },
    editor: { description: 'Can edit content' },
    viewer: {},
  },
});

Properties

PropertyTypeDescriptionDefined in
description?stringHuman-readable description of the role, shown in the Modelence Cloud dashboard.packages/modelence/src/auth/types.ts:90