TAuthController constructor

TAuthController({
  1. Iterable<String>? permissions,
  2. TPermissionGranter? granter,
  3. TAuthConfig config = const TAuthConfig(),
  4. bool loading = false,
})

With no permissions and no granter the controller is unconfigured and allows everything. Once a list is supplied (even an empty one), any permission not in it is denied.

Implementation

TAuthController({Iterable<String>? permissions, TPermissionGranter? granter, this.config = const TAuthConfig(), bool loading = false})
    : _granter = granter ?? (permissions == null ? null : TPermissionSet(permissions)),
      _loading = loading;