Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.xpertai.cn/llms.txt

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

This page explains where feature switches, role permission switches, roleNames, and workspace capabilities are controlled, what backend data seeds them, and how default values take effect.

Control Sources And Defaults

Switch typeWhere it is controlledBackend sourceDefault ruleNotes
Feature switch, for example FEATURE_XPERTSettings / Feature: /settings/features/tenant and /settings/features/organizationFeature definitions are seeded from DEFAULT_FEATURES; tenant and organization overrides are stored as feature-organization rows.A feature resolves to enabled by default. If a matching environment toggle exists and is exactly false, the resolved default becomes disabled; if no matching environment toggle exists, the resolved default is enabled. Tenant and organization rows copy the resolved feature value when created.Reading switches requires ALL_ORG_VIEW; updating switches requires ALL_ORG_EDIT; system upgrade/backfill requires SUPER_ADMIN.
Role permission switch, for example ALL_ORG_EDITSettings / Roles: /settings/rolesRole permission rows are seeded from DEFAULT_ROLE_PERMISSIONS.Seeded role-permission rows are enabled for the roles listed in the default permission table below; unlisted role-permission pairs are off or absent by default.Changing role permissions requires CHANGE_ROLES_PERMISSIONS. SUPER_ADMIN role permissions cannot be modified or deleted through the role-permission API.
roleName check, for example SUPER_ADMIN or ADMINUser role assignmentRoute guards or backend decorators check the current user’s role.The default system roles are SUPER_ADMIN, ADMIN, TRIAL, AI_BUILDER, ANALYTICS_BUILDER, and VIEWER.This is not a feature switch. The role must be assigned to the user.
Workspace capability, for example workspace.capabilities.canManageWorkspace ownership, membership, visibility, and sharing rulesComputed workspace capability, not a role-permission enum.No global on/off default in the role-permission matrix.Used by Xpert workspace actions after the user has entered the Xpert feature.

Default Feature Switches By Module

ModuleFeature switchesDefault valueControl / fallback
Platform homeFEATURE_HOME, FEATURE_DASHBOARDEnabled by default.Hardcoded as enabled in the platform default feature definition. The current dashboard menu entry is commented out; Analytics children under Home are controlled separately by FEATURE_HOME_CATALOG and FEATURE_HOME_TREND.
Platform settingsFEATURE_ORGANIZATION, FEATURE_USER, FEATURE_EMAIL, FEATURE_EMAIL_TEMPLATE, FEATURE_SETTING, FEATURE_FILE_STORAGE, FEATURE_SMTP, FEATURE_ROLES_PERMISSION, FEATURE_INTEGRATIONEnabled by default.Matching environment variables can resolve the feature as disabled only when they are exactly false; a feature without a matching environment toggle resolves to enabled. After seeding, tenant/organization switches are maintained from Settings / Feature.
Platform defaults not seededFEATURE_SMS_GATEWAYNot seeded as an enabled feature row in the current default feature list.The enum and environment toggle exist, but the SMS Gateway child entry is commented out in the default feature definition.
AI / CopilotFEATURE_COPILOT, FEATURE_COPILOT_KNOWLEDGEBASE, FEATURE_COPILOT_CHATEnabled by default.Controlled by environment seed value plus tenant/organization feature switches.
AI / XpertFEATURE_XPERTEnabled by default.Controlled by environment seed value plus tenant/organization feature switches.
AI / Xpert child entriesFEATURE_XPERT_CLAWXPERT, FEATURE_XPERT_CHATBI, FEATURE_XPERT_CODEXPERT, FEATURE_XPERT_DEEP_RESEARCHEnabled by default in the seeded AI feature definition.These are child switches under Xpert and are still evaluated with the tenant/organization feature rows at runtime.
BI / AnalyticsFEATURE_BUSINESS_AREA, FEATURE_INDICATOR, FEATURE_INDICATOR_MARKET, FEATURE_INDICATOR_REGISTER, FEATURE_INDICATOR_APP, FEATURE_MODEL, FEATURE_STORY, FEATURE_PROJECT, FEATURE_HOME_CATALOG, FEATURE_HOME_TRENDEnabled by default.Analytics feature definitions are appended into the system default feature list during analytics module preparation.
BI / Data FactoryFEATURE_DATA_FACTORYNot seeded as an enabled feature row in the current default feature list.The enum exists, but the default feature definition is currently commented out; confirm concrete entry behavior before relying on it as a visible switch.
Permission-only pagesOrganizations, Feature maintenance, Tenant settings, PluginsNo feature switch in this matrix.These entries are controlled by role permissions or roleName checks instead of feature switches.

Default Permission Switches By Role

These defaults describe seed-time role-permission rows. They can be changed from Settings / Roles for non-SUPER_ADMIN roles when the current user has CHANGE_ROLES_PERMISSIONS.
Permission groupPermissionsEnabled by default forNotes
Tenant and organization administrationALL_ORG_VIEW, ALL_ORG_EDIT, CHANGE_SELECTED_ORGANIZATION, CHANGE_ROLES_PERMISSIONSSUPER_ADMIN, ADMIN, TRIALALL_ORG_EDIT is the switch that allows updating tenant/organization feature switches and tenant-level organization/user operations.
User viewingORG_USERS_VIEWSUPER_ADMIN, ADMIN, TRIAL, AI_BUILDERAI_BUILDER can view organization users by default.
User maintenanceORG_USERS_EDITSUPER_ADMIN, ADMIN, TRIALCreate, edit, and maintain organization users.
Invite administrationORG_INVITE_VIEWSUPER_ADMIN, ADMIN, TRIAL, AI_BUILDERView invite records.
Invite maintenanceORG_INVITE_EDITSUPER_ADMIN, ADMIN, TRIALCreate, resend, and delete invites.
Integration viewingINTEGRATION_VIEWSUPER_ADMIN, ADMIN, TRIAL, AI_BUILDERAI builders can view integrations by default.
Email and SMTP settingsVIEW_ALL_EMAIL_TEMPLATES, CUSTOM_SMTP_VIEWSUPER_ADMIN, ADMIN, TRIALSettings entries outside AI and BI.
Integration editINTEGRATION_EDITSUPER_ADMIN, ADMIN, TRIAL, AI_BUILDERAI builders can edit integrations by default.
High-risk administrationSUPER_ADMIN_EDIT, ACCESS_DELETE_ACCOUNT, ACCESS_DELETE_ALL_DATASUPER_ADMINDelete-account and delete-all-data permissions are removed in demo mode.
AI read/useCOPILOT_VIEW, CHAT_VIEWAll default rolesCHAT_VIEW is available to SUPER_ADMIN, ADMIN, TRIAL, AI_BUILDER, ANALYTICS_BUILDER, and VIEWER.
AI build/manageXPERT_EDITSUPER_ADMIN, ADMIN, TRIAL, AI_BUILDER, ANALYTICS_BUILDERVIEWER does not get XPERT_EDIT by default.
AI administrationCOPILOT_EDIT, KNOWLEDGEBASE_EDITSUPER_ADMIN, ADMIN, TRIAL, AI_BUILDERANALYTICS_BUILDER and VIEWER do not get these edit permissions by default.
BI viewMODELS_VIEW, STORIES_VIEWAll default rolesThese are the broadest BI view defaults.
BI build/manageDATA_SOURCE_VIEW, DATA_SOURCE_EDIT, MODELS_EDIT, STORIES_EDIT, BUSINESS_AREA_EDIT, CERTIFICATION_EDIT, INDICATOR_EDIT, DATA_FACTORY_VIEW, DATA_FACTORY_EDITSUPER_ADMIN, ADMIN, TRIAL, ANALYTICS_BUILDERAI builders do not get these BI edit permissions by default.
BI read-only extrasBUSINESS_AREA_VIEW, INDICATOR_VIEW, INDICATOR_MARTKET_VIEWSUPER_ADMIN, ADMIN, TRIAL, ANALYTICS_BUILDER, VIEWERViewer can view these BI areas but cannot edit them by default.

Default Roles

roleNameDefault access scope
SUPER_ADMINFull platform, AI, and BI administration permissions, including super-admin-only abilities and dangerous delete abilities.
ADMINMost platform, AI, and BI administration permissions, excluding super-admin-only abilities and dangerous delete abilities.
TRIALFull AI permissions, BI builder permissions for models/stories/indicators, and most platform administration permissions. Some operations are still restricted separately.
AI_BUILDERAI building capabilities. On the platform side, can view/edit integrations and view organization users/invites. On the BI side, mainly model and story viewing.
ANALYTICS_BUILDERBI building capabilities. On the AI side, can enter chat and build Xperts, but cannot edit Copilot or knowledge bases.
VIEWERRead-oriented role. Can enter chat, view part of BI content, and mainly use profile and organization switching on the platform side.