hasCapability method

bool hasCapability(
  1. UserCapability capability
)

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

See UserCapabilitiesExtension.has if you want to check for multiple capabilities.

Implementation

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