ReleaseOwnershipResolver class

Answers whether an account owns any release item — the line between a member whose paid time funds creators and an author whose time must not.

AppUser.releaseItemIds cannot answer it: publishing stopped adding to that list, so it only knows about old releases. The catalog is asked instead, by profile id (present in public projections) and by owner email (absent from them), and the answer is cached per account so listening sessions do not each cost a query.

Constructors

ReleaseOwnershipResolver({Future<bool> ownsByProfileId(String profileId)?, Future<bool> ownsByEmail(String profileId)?, DateTime now()?})

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ownsAnyReleaseItem({required String email, Iterable<String> profileIds = const [], List<String>? legacyReleaseItemIds}) → Future<bool>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

clearCache() → void
invalidate(String email) → void
Forgets the cached answer for email — call it after a publish.

Constants

cacheTtl → const Duration
How long an answer is trusted. A new author's first release is picked up after this at the latest, or at once through invalidate.