Show / Hide Table of Contents

Class MultitenantRoleManager<TRole>

Provides the APIs for managing roles in a persistence store in a multi-tenant application.

Inheritance
Object
Microsoft.AspNetCore.Identity.RoleManager<TRole>
ExtendedRoleManager<TRole>
MultitenantRoleManager<TRole>
Inherited Members
ExtendedRoleManager<TRole>.GetUserRolesAsync(Guid)
ExtendedRoleManager<TRole>.GetAllRolesAsync(RolesSearchQuery)
ExtendedRoleManager<TRole>.DeleteAsync(TRole)
ExtendedRoleManager<TRole>.UpdateRoleFromTemplateAsync(TRole, IRoleTemplate)
ExtendedRoleManager<TRole>.CreateRoleFromTemplateAsync(IRoleTemplate)
ExtendedRoleManager<TRole>.AddPermissionAsync(TRole, String)
ExtendedRoleManager<TRole>.RemovePermissionAsync(TRole, String)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.CreateAsync(TRole)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.UpdateNormalizedRoleNameAsync(TRole)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.UpdateAsync(TRole)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.RoleExistsAsync(System.String)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.NormalizeKey(System.String)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.FindByIdAsync(System.String)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.GetRoleNameAsync(TRole)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.SetRoleNameAsync(TRole, System.String)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.GetRoleIdAsync(TRole)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.FindByNameAsync(System.String)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.AddClaimAsync(TRole, System.Security.Claims.Claim)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.RemoveClaimAsync(TRole, System.Security.Claims.Claim)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.GetClaimsAsync(TRole)
RoleManager<TRole>.Dispose()
Microsoft.AspNetCore.Identity.RoleManager<TRole>.Dispose(System.Boolean)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.ValidateRoleAsync(TRole)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.UpdateRoleAsync(TRole)
Microsoft.AspNetCore.Identity.RoleManager<TRole>.ThrowIfDisposed()
RoleManager<TRole>.CancellationToken
RoleManager<TRole>.Store
Microsoft.AspNetCore.Identity.RoleManager<TRole>.Logger
Microsoft.AspNetCore.Identity.RoleManager<TRole>.RoleValidators
Microsoft.AspNetCore.Identity.RoleManager<TRole>.ErrorDescriber
Microsoft.AspNetCore.Identity.RoleManager<TRole>.KeyNormalizer
RoleManager<TRole>.Roles
RoleManager<TRole>.SupportsQueryableRoles
Microsoft.AspNetCore.Identity.RoleManager<TRole>.SupportsRoleClaims
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public class MultitenantRoleManager<TRole> : ExtendedRoleManager<TRole>, IDisposable where TRole : class, IMultitenantRole, new()
Type Parameters
TRole

The type encapsulating a role.

Constructors

MultitenantRoleManager(IMultitenantRoleStore<TRole>, IEnumerable<IRoleValidator<TRole>>, IServiceProvider, ILookupNormalizer, IdentityErrorDescriber, ILogger<MultitenantRoleManager<TRole>>)

Constructs a new instance of ExtendedRoleManager<TRole>.

Declaration
public MultitenantRoleManager(IMultitenantRoleStore<TRole> store, IEnumerable<IRoleValidator<TRole>> roleValidators, IServiceProvider services, ILookupNormalizer keyNormalizer, IdentityErrorDescriber errors, ILogger<MultitenantRoleManager<TRole>> logger)
Parameters
IMultitenantRoleStore<TRole> store

The persistence store the manager will operate over.

IEnumerable<Microsoft.AspNetCore.Identity.IRoleValidator<TRole>> roleValidators

A collection of validators for roles.

System.IServiceProvider services

The System.IServiceProvider used to resolve services.

Microsoft.AspNetCore.Identity.ILookupNormalizer keyNormalizer

The normalizer to use when normalizing role names to keys.

Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors

The Microsoft.AspNetCore.Identity.IdentityErrorDescriber used to provider error messages.

Microsoft.Extensions.Logging.ILogger<MultitenantRoleManager<TRole>> logger

The logger used to log messages, warnings and errors.

Methods

CreateFromTemplateAsync(IRoleTemplate, Nullable<Guid>)

Creates a new role from the specified template in the persistence store.

Declaration
public override async Task<IdentityResult> CreateFromTemplateAsync(IRoleTemplate template, Guid? tenantId = null)
Parameters
IRoleTemplate template

The IRoleTemplate to create a new role for.

System.Nullable<System.Guid> tenantId

The identity of the tenant that the role should be created for.

Returns
System.Threading.Tasks.Task<IdentityResult>

The System.Threading.Tasks.Task that represents the asynchronous operation.

Overrides
IRM.AspNetCore.Identity.ExtendedRoleManager<TRole>.CreateFromTemplateAsync(IRM.AspNetCore.Identity.IRoleTemplate, System.Nullable<System.Guid>)
Back to top Generated by DocFX