From 5acd2674705dc8abbec7d86e5045e017dafad9eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Jerman?= Date: Thu, 7 Oct 2021 10:47:54 +0200 Subject: [PATCH] Fix improper auth context when processing automation scripts --- app/boot_levels.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/boot_levels.go b/app/boot_levels.go index f8cbe6fb4..8c254f733 100644 --- a/app/boot_levels.go +++ b/app/boot_levels.go @@ -459,8 +459,11 @@ func (app *CortezaApp) Activate(ctx context.Context) (err error) { } // Load corredor scripts & init watcher (script reloader) - corredor.Service().Load(ctx) - corredor.Service().Watch(ctx) + { + ctx := auth.SetIdentityToContext(ctx, auth.ServiceUser()) + corredor.Service().Load(ctx) + corredor.Service().Watch(ctx) + } sysService.Watchers(ctx) autService.Watchers(ctx)