Skip to content

Plugin Permissions

Every plugin must declare the permissions it needs in omnilux-plugin.json. OmniLux enforces these at runtime — a plugin cannot perform actions outside its declared permissions.

Permission reference

Network

PermissionDescription
network:outboundMake outbound HTTP/HTTPS requests (fetch, API calls)
network:listenOpen a listening socket (rarely needed — most plugins use registered routes instead)

Storage

PermissionDescription
storage:readRead files from the media library
storage:writeWrite files to the media library
storage:downloadsRead and write to the downloads directory

Database

PermissionDescription
database:readRead from the plugin's database tables
database:read-writeRead and write to the plugin's database tables

INFO

Plugins can only access their own database tables. Cross-plugin database access is not permitted.

Settings

PermissionDescription
settings:readRead plugin settings
settings:read-writeRead and write plugin settings

UI

PermissionDescription
ui:settings-tabRegister a settings panel in the Settings page
ui:pageRegister a full page in the web UI
ui:dashboard-widgetRegister a widget on the dashboard

Scheduler

PermissionDescription
scheduler:registerRegister background jobs that run on a schedule

Notifications

PermissionDescription
notifications:sendSend notifications through the notification system

Least privilege

Declare only the permissions your plugin actually needs. Examples:

Plugin typeTypical permissions
Notification agentnetwork:outbound, notifications:send
Download clientnetwork:outbound, storage:downloads, database:read-write, settings:read-write, scheduler:register, ui:settings-tab
Indexernetwork:outbound, database:read-write, settings:read-write
Metadata providernetwork:outbound, settings:read
Scannerstorage:read, database:read-write, scheduler:register

Permission denied errors

If a plugin attempts an action without the required permission, a PermissionDeniedError is thrown:

PermissionDeniedError: Plugin "my-plugin" lacks permission "network:outbound"

The error is logged and the operation is blocked. The plugin continues running — only the denied operation fails.

Checking permissions in code

typescript
import { createPermissionChecker } from '@omnilux/plugin-sdk';

const checker = createPermissionChecker(manifest.permissions);

if (checker.has('network:outbound')) {
  // Safe to make HTTP requests
}

Use OmniLux, run your own server, or build on the platform.