hasCapability method

bool hasCapability(
  1. UserCapability capability
)

Returns true if the user has the given capability. Otherwise false.

See UserCapabilitiesExtension.has for confirming multiple capabilities.

Implementation

bool hasCapability(UserCapability capability) => capabilities.contains(capability);