Class AddGrantCommand
- Namespace
- Excalibur.A3.Authorization.Grants
- Assembly
- Excalibur.A3.dll
Represents a command to add a grant to a user.
[Activity("Add grant", "Grants a user new permissions.")]
public sealed class AddGrantCommand : AuthorizeCommandBase<AuditableResult<bool>>, IAuthorizeCommand<AuditableResult<bool>>, ICommand<AuditableResult<bool>>, ICommand, IActivity, IAmCorrelatable, IAmMultiTenant, IDispatchAction<AuditableResult<bool>>, IRequireAuthorization, IDispatchAction, IDispatchMessage, IGrantCommand
- Inheritance
-
AddGrantCommand
- Implements
- Inherited Members
Remarks
This command is used to assign new permissions to a user by specifying the grant type, qualifier, and other details.
Constructors
AddGrantCommand(string, string, string, string, DateTimeOffset?, Guid, string?)
Represents a command to add a grant to a user.
public AddGrantCommand(string userId, string fullName, string grantType, string qualifier, DateTimeOffset? expiresOn, Guid correlationId, string? tenantId = null)
Parameters
userIdstringThe ID of the user to whom the grant will be added.
fullNamestringThe full name of the user.
grantTypestringThe type of the grant to be added.
qualifierstringA specific qualifier for the grant, such as a resource or context.
expiresOnDateTimeOffset?The expiration date and time for the grant, if any.
correlationIdGuidThe unique correlation ID for the command.
tenantIdstringThe tenant ID associated with the command, if applicable.
Remarks
This command is used to assign new permissions to a user by specifying the grant type, qualifier, and other details.
Properties
ExpiresOn
Gets or sets the expiration date and time for the grant.
public DateTimeOffset? ExpiresOn { get; set; }
Property Value
- DateTimeOffset?
The expiration date and time, or null if the grant does not expire.
Remarks
If null , the grant will not have an expiration.
FullName
Gets or sets the full name of the user to whom the grant will be added.
public string FullName { get; set; }
Property Value
- string
The full name of the user.
GrantType
Gets or sets the type of the grant to be added.
public string GrantType { get; set; }
Property Value
- string
The type of the grant.
Examples
Examples of grant types include "ActivityGroup" or "Activity".
Qualifier
Gets or sets the qualifier for the grant.
public string Qualifier { get; set; }
Property Value
- string
The qualifier for the grant.
Remarks
The qualifier can be used to specify a resource or context that the grant applies to.
UserId
Gets or sets the ID of the user to whom the grant will be added.
public string UserId { get; set; }
Property Value
- string
The ID of the user.