DataRule enum

Who can read and write a cloud database collection. Set per collection in the editor's Data panel, stored in data_rules/{projectId}, and enforced by Firestore security rules; the SDK stamps and filters by DataRules.ownerField so its writes and queries pass them.

Inheritance
Available extensions

Values

app → const DataRule

Anyone using the app. The default.

signedIn → const DataRule

Only signed-in users can read and write.

owner → const DataRule

Each signed-in user reads and writes only their own documents.

publicReadOwnerWrite → const DataRule

Anyone using the app reads; signed-in users write only their own documents.

roleWrite → const DataRule

Anyone using the app reads; only signed-in users whose profile has the collection's role (DataRules.roles) write.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
readsOwnOnly → bool
Whether reads only return the signed-in user's own documents.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stampsOwner → bool
Whether writes record the signed-in user as the document's owner.
no setter
writeNeedsSignIn → bool
Whether writing needs a signed-in user.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<DataRule>
A constant List of the values in this enum, in order of their declaration.