Class AnyScopedOperationRequirement
- Namespace
- Arc4u.Authorization
- Assembly
- Arc4u.Authorization.dll
Represents an authorization requirement that is satisfied as soon as the current principal is granted any one of the specified scoped operations (OR logic).
public class AnyScopedOperationRequirement : IAuthorizationRequirement
- Inheritance
-
AnyScopedOperationRequirement
- Implements
- Inherited Members
Remarks
Each operation is an integer identifier (typically an ID) paired with a scope — a free-form string used to partition permissions (e.g. a tenant or feature area). An empty scope (Empty) is the default and matches operations granted without an explicit scope.
Constructors
AnyScopedOperationRequirement(params int[])
Initializes a new instance using the default (empty) scope for every operation.
public AnyScopedOperationRequirement(params int[] operations)
Parameters
operationsint[]One or more operation identifiers.
AnyScopedOperationRequirement(string, params int[])
Initializes a new instance where every operation is paired with the same scope.
public AnyScopedOperationRequirement(string scope, params int[] operations)
Parameters
scopestringThe scope applied to every operation. Must not be null.
operationsint[]One or more operation identifiers.
Exceptions
- ArgumentNullException
scopeis null.
AnyScopedOperationRequirement(params (string, int)[])
Initializes a new instance with explicit (scope, operation) pairs, allowing each operation to belong to a different scope.
public AnyScopedOperationRequirement(params (string, int)[] operations)
Parameters
operations(string, int)[]One or more (scope, operation) tuples. Each scope must be non-null; use Empty for the default scope.
Properties
Operations
Gets the (scope, operation) pairs from which at least one must be granted to the current principal for the requirement to be satisfied.
public (string scope, int operation)[] Operations { get; }