storeAccess function
The account's entitlements, capabilities, content, and allowances.
Authoritative and server-resolved: the client mirrors it for presentation and never decides access from it.
Implementation
@riverpod
Future<AccessSnapshot> storeAccess(Ref ref) async {
if (!ref.watch(storeAvailableProvider)) {
return AccessSnapshot(
entitlements: const [],
permissions: const [],
content: const [],
limits: const [],
);
}
return ref.watch(commerceServiceProvider).getAccess();
}