Class UserPermissions

Represents a set of user permissions and provides methods to manage them.

Constructors

Properties

Methods

Constructors

Properties

Flags: Record<UserPermissionString, number>

A mapping of user permission strings to their numeric equivalents.

Methods

  • Checks if this instance is equal to another UserPermissions instance.

    Parameters

    Returns boolean

    true if both instances are equal, otherwise false.

  • Checks if the specified permission is granted.

    Parameters

    Returns boolean

    true if the permission is granted, otherwise false.

  • Checks if the provided permission is valid.

    Parameters

    • permission: string

      The permission to validate.

    Returns boolean

    true if the permission is valid, otherwise false.