ReadonlyDescriptionHuman-readable description of what this provider covers.
ReadonlyDomainOpt-in marker read by ClassFactory (see ClassResolutionResult): this class CANNOT
function standalone — every member below is abstract, so a base instance is a method-less
stub. TypeScript's abstract is erased at runtime, so the factory cannot detect that on its
own; without this marker an unresolvable ProviderClassName would silently be handed back
as a live "provider" and blow up later at the first method call.
With the marker set, CreateInstance throws and TryCreateInstance returns
{Resolved: false, Instance: null} — both of which PermissionEngine handles by skipping
the domain.
ReadonlySupportedWhat actions this provider can evaluate.
ReadonlySupportedWhat grantee types this provider supports.
ReadonlySupportsWhether this provider supports explicit Deny records.
ProtectedboolsMap a { Read?: boolean, Update?: boolean, … } descriptor to a canonical
PermissionAction[]. Replaces the 9 hand-rolled copies that each walked
their row's CRUD-ish booleans and pushed action names.
Output order matches the canonical order declared in PermissionAction.
Entries that are null/undefined/false are skipped.
ProtectedbuildBuild a NormalizedPermission with DomainName and Effect
pre-filled from the provider. Centralizes the ~10-field literal that
used to be constructed in every GetUserResources / GetEffectivePermissions /
GetResourcePermissions implementation.
Effect defaults to 'Allow' since the vast majority of providers don't
support Deny. Providers that emit Deny records (EntityPermissionProvider)
pass { effect: 'Deny' } explicitly.
ProtectedbulkGiven a list of IDs, fetch {ID, <nameField>} from entityName and return
a Map<ID, name>. Used by providers whose domain views don't denormalize
a resource name onto the permission row (AI Agents, Artifacts, Collections).
Returns an empty Map when ids is empty or the RunView fails — callers should
treat a missing key as "name unknown."
OptionalnameField: stringCheck if a user has a specific permission on a specific resource.
The user whose permissions are being checked (roles come from user.UserRoles).
The resource type within this domain (e.g., entity name, resource type name).
The specific resource ID; null for domain-wide checks.
The action being requested.
Optional_provider: IMetadataProviderProtectedfetchStandard RunView wrapper that logs failures with <ProviderClass>.<methodName>:
prefix and returns the row list (or [] on failure). Replaces the boilerplate
that each provider previously carried around its RunView calls.
Get all effective permissions a user has on a specific resource. Returns an empty array when the user has no access.
Optional_provider: IMetadataProviderRows granted directly by this user to other users. Uses the
SharedByUserID column (added in migration
V202604231235__v5.29.x__ResourcePermission_SharedByUserID.sql) so every
resource type that writes through MJ: Resource Permissions surfaces
correctly in the end-user Sharing Center's "Shared by me" tab.
Only Approved, User-grantee rows are returned — pending requests
(Status === 'Requested') and Role grants don't belong in a personal
sharing view.
Rows where this user is the direct grantee AND someone else is the grantor —
the inverse of GetPermissionsGrantedByUser. Powers the Sharing
Center's "Shared with me" tab for every resource type that writes through
MJ: Resource Permissions (Conversations, Reports, User Views, etc.).
Only Approved, User-grantee rows are returned. Role-inherited access is intentionally excluded — a personal "Shared with me" view shouldn't surface org-wide role grants. Self-grants (user shared a resource with themselves) are also filtered out.
Get all permissions granted on a specific resource across every grantee. Powers the Sharing Center's "Resource Access Report" view.
Optionalprovider: IMetadataProviderDefault implementation returns [] — providers should override to advertise
their supported resource types (see IPermissionProvider.GetResourceTypes).
Get all resources within this domain that the user has access to. Powers the Sharing Center's "User Access Report" view.
OptionalresourceType: stringOptional filter to one resource type within the domain.
Optional_provider: IMetadataProvider
Wraps ResourcePermissionEngine.GetUserResourcePermissionLevel behind the unified PermissionProviderBase contract.
Resource permissions support both Users and Roles as grantees and use a hierarchical level model (View < Edit < Owner). The provider translates those levels into canonical action sets: View → [Read], Edit → [Read, Update], Owner → [Read, Update, Delete, Share, Admin].
resourceTypeis the human-readable name from theMJ: Resource Typesentity (e.g.,"User Views","Reports").resourceIdis the target record ID.