Ensure events are run with DB level permissions

This commit is contained in:
Tobie Morgan Hitchcock 2018-04-10 07:19:22 +01:00
parent 93b11514c5
commit 9b4ff941b6

View file

@ -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)