Innovt Platform
Search Results for

    Show / Hide Table of Contents

    Class Role

    Define a list of permissions that can be used

    Inheritance
    object
    Entity
    Entity<Guid>
    Role
    Inherited Members
    Entity<Guid>.Id
    Entity.CreatedAt
    Entity.UpdatedAt
    Entity.IsNew()
    Entity.SetAsNew()
    Entity.AddDomainEvent(DomainEvent)
    Entity.GetDomainEvents()
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Innovt.Domain.Security
    Assembly: Innovt.Domain.dll
    Syntax
    public class Role : Entity<Guid>

    Constructors

    | Edit this page View Source

    Role()

    Initializes a new instance of the Role class.

    Declaration
    public Role()

    Properties

    | Edit this page View Source

    Description

    Gets or sets the description of the role.

    Declaration
    public string Description { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Name

    Gets or sets the name of the role.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Permissions

    Gets or sets the list of permissions associated with the role.

    Declaration
    public IList<Permission> Permissions { get; set; }
    Property Value
    Type Description
    IList<Permission>
    | Edit this page View Source

    Scope

    Gets or sets the scope of the role.

    Declaration
    public string Scope { get; set; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    AssignPermission(Permission)

    Assigns a permission to the role.

    Declaration
    public void AssignPermission(Permission permission)
    Parameters
    Type Name Description
    Permission permission

    The permission to be assigned.

    | Edit this page View Source

    Equals(object)

    Determines whether the current Role instance is equal to another object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current instance.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current instance; otherwise, false.

    Overrides
    Entity.Equals(object?)
    | Edit this page View Source

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    Entity.GetHashCode()
    | Edit this page View Source

    RemovePermission(Guid)

    Removes a permission from the role by its identifier.

    Declaration
    public void RemovePermission(Guid permissionId)
    Parameters
    Type Name Description
    Guid permissionId

    The identifier of the permission to be removed.

    Extension Methods

    Extensions.IsNull(object)
    Extensions.ToStringOrDefault(object)
    SimpleMapper.MapTo<T1>(object)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX