Hex Core JS
    Preparing search index...

    Function checkPermission

    • Checks if the user has the required permission using the permissions object.

      Parameters

      • requiredPermission: string

        A permission name to check for.

      • permissions: Record<string, boolean>

        An object of permission names that the user has (can be retreived from the PermissionContext).

      Returns boolean

    • Checks if the user has the required permissions using the permissions object.

      Parameters

      • requiredPermissions: string[]

        An array of permission names to check for.

      • permissions: Record<string, boolean>

        An object of permission names that the user has (can be retreived from the PermissionContext).

      • OptionalcheckMethod: PermissionCheckMethodLiteral | PermissionCheckMethod

        Determines if all permissions are required (And) or at least one is required (Or).

      Returns boolean