can method

bool can(
  1. String ability
)

Whether the user may perform ability on this specific record. Absent means denied — an unlisted ability is never assumed allowed.

Implementation

bool can(String ability) => permissions[ability] ?? false;