From e57567934750a86b3f6be6a572f68ae501d9b4b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20B=C3=BCtow?= Date: Tue, 11 Feb 2020 17:39:42 +0000 Subject: [PATCH] scheduled user with permissions --- internal/user/server/user.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/user/server/user.go b/internal/user/server/user.go index 271a4ac..7389d74 100644 --- a/internal/user/server/user.go +++ b/internal/user/server/user.go @@ -41,6 +41,11 @@ func (u *User) String() string { func (u *User) HasFilePermission(filePath, permissionType string) (hasPermission bool) { logger.Debug(u, filePath, permissionType, "Checking config permissions") + if u.Name == config.ScheduledUser { + // Schedule user has same permissions as dtail process itself. + return true + } + cleanPath, err := filepath.EvalSymlinks(filePath) if err != nil { logger.Error(u, filePath, permissionType, "Unable to evaluate symlinks", err)