Skip to content

Commit

Permalink
scheduled user with permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
pbuetow committed Feb 11, 2020
1 parent 218344c commit e575679
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/user/server/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e575679

Please sign in to comment.