capabilities property

List<UserCapability> get capabilities

The capabilities the user has

Implementation

List<UserCapability> get capabilities {
  final capabilities = <UserCapability>[];

  for (final capability in UserCapability.values) {
    final mask = 1 << capability.index;

    if (capabilitiesBitMask & mask != 0) capabilities.add(capability);
  }

  return capabilities;
}