Skip to main content
API Reference / modelence / server / RoleDefinition
RoleDefinition = object
Defined in: packages/modelence/src/auth/types.ts:50 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:52