diff options
| author | Paul Bütow <pbuetow@mimecast.com> | 2020-02-11 17:39:42 +0000 |
|---|---|---|
| committer | Paul Bütow <pbuetow@mimecast.com> | 2020-02-11 17:39:42 +0000 |
| commit | e57567934750a86b3f6be6a572f68ae501d9b4b3 (patch) | |
| tree | d17d0b5ba77adc49470ffa27e1cda7e2a0ac05f3 | |
| parent | 218344cd9b63b490cbea50f6420ff267b1c993d5 (diff) | |
scheduled user with permissionsv2.1.0
| -rw-r--r-- | internal/user/server/user.go | 5 |
1 files changed, 5 insertions, 0 deletions
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) |
