Class: Parse::Constraint::NotWriteableByConstraint
- Inherits:
-
Constraint
- Object
- Constraint
- Parse::Constraint::NotWriteableByConstraint
- Includes:
- AclConstraintHelpers
- Defined in:
- lib/parse/query/constraints.rb
Overview
Note:
This constraint uses aggregation pipeline because Parse Server restricts direct queries on the internal _wperm field.
ACL NOT Writable By Constraint Query objects that are NOT writable by the specified users/roles.
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#build ⇒ Object
3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 |
# File 'lib/parse/query/constraints.rb', line 3201 def build keys = normalize_acl_keys(@value) return { "__aggregation_pipeline" => [] } if keys.empty? pipeline = [ { "$match" => { "_wperm" => { "$nin" => keys }, }, }, ] { "__aggregation_pipeline" => pipeline } end |