parent
ea84f839da
commit
1e93c0f304
3 changed files with 5 additions and 1 deletions
|
@ -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() {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue