EntityAccessRules class

Rules to access entities. Used by APIServer responses.

Inheritance
Implementers

Constructors

EntityAccessRules({EntityAccessRuleType? ruleType, Type? entityType, List<String>? entityFields, List<EntityAccessRules>? rules, EntityAccessRulesCondition? condition})
const
EntityAccessRules.allow(Type entityType, {List<String>? entityFields, EntityAccessRulesCondition? condition})
const
EntityAccessRules.allowFields(Type entityType, List<String> entityFields, {EntityAccessRulesCondition? condition})
const
EntityAccessRules.block(Type entityType, {List<String>? entityFields, EntityAccessRulesCondition? condition})
const
EntityAccessRules.blockFields(Type entityType, List<String> entityFields, {EntityAccessRulesCondition? condition})
const
EntityAccessRules.group(List<EntityAccessRules> rules)
const

Properties

condition EntityAccessRulesCondition?
final
entityFields List<String>?
final
entityType Type?
final
hashCode int
The hash code for this object.
no setteroverride
isInnocuous bool
Returns true if this instance is equivalent to innocuous instance (no resolution rules to apply).
no setteroverride
isValid bool
Return true if this instance rules are valid.
no setteroverride
rules List<EntityAccessRules>?
final
ruleType EntityAccessRuleType?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({EntityAccessRuleType? ruleType, Type? entityType, List<String>? entityFields, List<EntityAccessRules>? rules, EntityAccessRulesCondition? condition}) EntityAccessRules
hasRuleForEntityType(Type type) bool
hasRuleForEntityTypeField(Type type) bool
isAllowedEntityType(Type type) bool?
isAllowedEntityTypeField(Type type, String field, {EntityAccessRulesContext? context}) bool?
merge(EntityAccessRules? other) EntityAccessRules
Merges this rules with other rules.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
simplified() EntityAccessRules
toJson() Map<String, Object?>
override
toJsonEncodable(APIRequest apiRequest, ToEncodableJsonProvider encodableJsonProvider, Object o) ToEncodableJson?
toString() String
A string representation of this object.
override
validate() → void
Validates this instances rules. See isValid.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

innocuous → const EntityAccessRules
A const instance without any resolution rules to apply.