DVStudioGrants class

The Studio grants, kept in the application's database.

Constructors

DVStudioGrants(DVDatabaseAdapter adapter, {String table = 'dv_studio_grants', DateTime clock()?})

Properties

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

Methods

grant(String userId, {String tenant = DVTenants.defaultTenant}) → Future<void>
Lets userId open Studio on tenant. Granting twice is one grant.
install() → void
Makes these grants the framework's answer to dvStudioAccessAction: a signed-in session whose user was granted on the session's tenant. Anything else -- no session, an API key, a person nobody granted -- is refused.
isGranted(String userId, {String tenant = DVTenants.defaultTenant}) → Future<bool>
Whether userId may open Studio on tenant.
list() → Future<List<DVStudioGrant>>
Every grant, oldest first.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
revoke(String userId, {String tenant = DVTenants.defaultTenant}) → Future<bool>
Takes the grant away. False when there was none.
toString() → String
A string representation of this object.
inherited

Operators

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