Class IdentityRole
Represents a role in the identity system
Inheritance
System.Object
IdentityRole
Implements
IHasExtraProperties
IMultiTenant
Assembly: Volo.Abp.Identity.Domain.dll
Syntax
public class IdentityRole : AggregateRoot<Guid>, IAggregateRoot<Guid>, IEntity<Guid>, IAggregateRoot, IEntity, IGeneratesDomainEvents, IHasExtraProperties, IHasConcurrencyStamp, IMultiTenant
Constructors
IdentityRole()
Declaration
IdentityRole(Guid, String, Nullable<Guid>)
Declaration
public IdentityRole(Guid id, string name, Guid? tenantId = null)
Parameters
Type |
Name |
Description |
Guid |
id |
|
System.String |
name |
|
System.Nullable<Guid> |
tenantId |
|
Properties
Claims
Navigation property for claims in this role.
Declaration
public virtual ICollection<IdentityRoleClaim> Claims { get; protected set; }
Property Value
IsDefault
A default role is automatically assigned to a new user
Declaration
public virtual bool IsDefault { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
IsPublic
A user can see other user's public roles
Declaration
public virtual bool IsPublic { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
IsStatic
A static role can not be deleted/renamed
Declaration
public virtual bool IsStatic { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Name
Gets or sets the name for this role.
Declaration
public virtual string Name { get; protected set; }
Property Value
Type |
Description |
System.String |
|
NormalizedName
Gets or sets the normalized name for this role.
Declaration
public virtual string NormalizedName { get; protected set; }
Property Value
Type |
Description |
System.String |
|
TenantId
Declaration
public virtual Guid? TenantId { get; protected set; }
Property Value
Type |
Description |
System.Nullable<Guid> |
|
Methods
AddClaim(IGuidGenerator, Claim)
Declaration
public virtual void AddClaim(IGuidGenerator guidGenerator, Claim claim)
Parameters
Type |
Name |
Description |
IGuidGenerator |
guidGenerator |
|
Claim |
claim |
|
AddClaims(IGuidGenerator, IEnumerable<Claim>)
Declaration
public virtual void AddClaims(IGuidGenerator guidGenerator, IEnumerable<Claim> claims)
Parameters
Type |
Name |
Description |
IGuidGenerator |
guidGenerator |
|
IEnumerable<Claim> |
claims |
|
ChangeName(String)
Declaration
public virtual void ChangeName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
FindClaim(Claim)
Declaration
public virtual IdentityRoleClaim FindClaim(Claim claim)
Parameters
Type |
Name |
Description |
Claim |
claim |
|
Returns
RemoveClaim(Claim)
Declaration
public virtual void RemoveClaim(Claim claim)
Parameters
Type |
Name |
Description |
Claim |
claim |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
Volo.Abp.Domain.Entities.Entity<Guid>.ToString()
Implements
IHasExtraProperties
IMultiTenant
Extension Methods