Table of Contents

Class CapabilityRegistry

Namespace
Builvero.Application.Utilities
Assembly
Builvero.Application.dll

Central registry of allowed plugin capabilities, organized by area.

public static class CapabilityRegistry
Inheritance
CapabilityRegistry
Inherited Members

Remarks

This is the single source of truth for all plugin capabilities. Capabilities must be allowlisted here before they can be declared in plugin manifests. This prevents privilege escalation and ensures security.

Methods

GetAllCapabilities()

Gets all allowed capabilities grouped by area.

public static Dictionary<string, List<string>> GetAllCapabilities()

Returns

Dictionary<string, List<string>>
Central registry of allowed plugin capabilities, organized by area.

GetAllCapabilitiesFlat()

Gets all allowed capabilities as a flat list.

public static List<string> GetAllCapabilitiesFlat()

Returns

List<string>
Central registry of allowed plugin capabilities, organized by area.

GetCapabilityArea(string)

Gets the area for a given capability.

public static string? GetCapabilityArea(string capability)

Parameters

capability string
Central registry of allowed plugin capabilities, organized by area.

Returns

string
Central registry of allowed plugin capabilities, organized by area.

GetCapabilityToEndpointMapping()

Gets the endpoint mapping guidance for capabilities.

public static Dictionary<string, List<string>> GetCapabilityToEndpointMapping()

Returns

Dictionary<string, List<string>>
Central registry of allowed plugin capabilities, organized by area.

Remarks

This maps capabilities to which plugin-safe API endpoints require them. Plugins can only call endpoints under /api/plugin/* that match their granted capabilities.

IsCapabilityAllowed(string)

Checks if a capability is allowed.

public static bool IsCapabilityAllowed(string capability)

Parameters

capability string
Central registry of allowed plugin capabilities, organized by area.

Returns

bool
Central registry of allowed plugin capabilities, organized by area.