Stores the fundamental permissions and access rights that can be granted to users and roles throughout the system.

Hierarchy (view full)

Constructors

Properties

Description: string = null

Description of the authorization

ID: string = null

Unique identifier for the authorization

IsActive: boolean = null

Indicates whether this authorization is currently active and can be granted to users or roles

Name: string = null

Name of the authorization

Parent: string

Name of the parent authorization

ParentID: string = null

The unique identifier for the parent authorization, if applicable

UseAuditLog: boolean = null

When set to 1, Audit Log records are created whenever this authorization is invoked for a user

_AuthorizationRoles: AuthorizationRoleInfo[] = []
__mj_CreatedAt: Date = null

Timestamp when the authorization was created

__mj_UpdatedAt: Date = null

Timestamp when the authorization was last updated

Accessors

Methods

  • Determines if a given role can execute actions under this authorization.

    Parameters

    • role: RoleInfo

      The role to check for execution rights.

    Returns boolean

    True if the role can execute actions under this authorization, otherwise false.

  • Sets up the roles associated with this authorization using the provided metadata and initial data.

    Parameters

    • md: IMetadataProvider

      The metadata provider to fetch role information.

    • authorizationRoles: AuthorizationRoleInfo[]

      An array of AuthorizationRoleInfo instances or equivalent data to be associated with this authorization.

    Returns void

  • Determines if a given user can execute actions under this authorization based on their roles.

    Parameters

    • user: UserInfo

      The user to check for execution rights.

    Returns boolean

    True if the user can execute actions under this authorization, otherwise false.

  • Copies initialization data from a plain object to the class instance. Only copies properties that already exist on the class to prevent creating new fields. Special handling for DefaultValue fields to extract actual values from SQL Server syntax.

    Parameters

    • initData: any

      The initialization data object

    Returns void