function hasPermission
hasPermission(
role: Role,
permission: Permission
): boolean

Checks whether role grants permission. The server's can and the client's can both wrap it.

Parameters

role: Role
permission: Permission

Return Type

boolean

Usage

import { hasPermission } from "shared/permissions.ts";