From 9b4ff941b659ad2d5bed12500c222412a8d5020b Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Tue, 10 Apr 2018 07:19:22 +0100 Subject: [PATCH] Ensure events are run with DB level permissions --- db/check.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/check.go b/db/check.go index 68462bdb..f6727dee 100644 --- a/db/check.go +++ b/db/check.go @@ -221,6 +221,8 @@ func (d *document) event(ctx context.Context, when method) (err error) { vars.Set(d.initial.Data(), varKeyBefore) ctx = context.WithValue(ctx, ctxKeySpec, vars) + ctx = context.WithValue(ctx, ctxKeyKind, cnf.AuthDB) + for _, ev := range evs { val, err := d.i.e.fetch(ctx, ev.When, d.current)