From ddf87a7188c9ebd722c2113566bb163c63c86f0f Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Mon, 18 Nov 2019 11:36:12 +0000 Subject: [PATCH] No need to pass $before and $after values for determining permissions --- db/perms.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/db/perms.go b/db/perms.go index 36f318ea..c8848939 100644 --- a/db/perms.go +++ b/db/perms.go @@ -74,16 +74,8 @@ func (d *document) perms(ctx context.Context, doc *data.Doc) (err error) { if p, ok := fd.Perms.(*sql.PermExpression); ok { - // Get the old value - - old := d.initial.Get(key).Data() - - // Reset the variables - vars := data.New() vars.Set(val, varKeyValue) - vars.Set(val, varKeyAfter) - vars.Set(old, varKeyBefore) ctx = context.WithValue(ctx, ctxKeySpec, vars) if v, err := d.i.e.fetch(ctx, p.Select, doc); err != nil {