Table of Contents

Class RoleAssignment

Namespace
FoundationaLLM.Common.Models.ResourceProviders.Authorization
Assembly
FoundationaLLM.Common.dll

Represents an RBAC role assignment.

public class RoleAssignment : AssignmentBase
Inheritance
RoleAssignment
Inherited Members
Extension Methods

Properties

AllowedActions

The explicit list of all allowed actions resulting from expanding all wildcards.

[JsonIgnore]
public HashSet<string> AllowedActions { get; set; }

Property Value

HashSet<string>

RoleDefinition

The RoleDefinition referenced by the RoleDefinitionId property.

[JsonIgnore]
public RoleDefinition? RoleDefinition { get; set; }

Property Value

RoleDefinition

RoleDefinitionId

The unique identifier of the role definition.

[JsonPropertyName("role_definition_id")]
public required string RoleDefinitionId { get; set; }

Property Value

string

Methods

Enrich(List<string>)

Enriches the role assignment with additional information.

public void Enrich(List<string> allowedInstanceIds)

Parameters

allowedInstanceIds List<string>

The list of FoundationaLLM instance identifiers used as context for the enrichment.

Remarks

This method is called when the role assignments are loaded into memory. Besides the actual enrichment, it also ensures that the Scope property is set correctly.