diff --git a/lib/src/doc/allow.rs b/lib/src/doc/allow.rs index 264a4f31..9ae93346 100644 --- a/lib/src/doc/allow.rs +++ b/lib/src/doc/allow.rs @@ -33,7 +33,7 @@ impl<'a> Document<'a> { Permission::None => return Err(Error::Ignore), Permission::Full => return Ok(()), Permission::Specific(e) => { - // Ensure permissions are disabled + // Disable permissions let opt = &opt.perms(false); // Process the PERMISSION clause if !e.compute(ctx, opt, txn, Some(&self.current)).await?.is_truthy() { diff --git a/lib/src/doc/field.rs b/lib/src/doc/field.rs index 5309a85a..fdc5a771 100644 --- a/lib/src/doc/field.rs +++ b/lib/src/doc/field.rs @@ -77,6 +77,8 @@ impl<'a> Document<'a> { Permission::Full => (), Permission::None => val = old, Permission::Specific(e) => { + // Disable permissions + let opt = &opt.perms(false); // Configure the context let mut ctx = Context::new(ctx); ctx.add_value("value".into(), &val); diff --git a/lib/src/doc/pluck.rs b/lib/src/doc/pluck.rs index b6b4b851..9759b547 100644 --- a/lib/src/doc/pluck.rs +++ b/lib/src/doc/pluck.rs @@ -62,6 +62,8 @@ impl<'a> Document<'a> { Permission::Full => (), Permission::None => out.del(ctx, opt, txn, k).await?, Permission::Specific(e) => { + // Disable permissions + let opt = &opt.perms(false); // Get the current value let val = self.current.pick(k); // Configure the context