[client] UI Refactor Icon Paths (#3420)

[client] UI Refactor Icon Paths (#3420)
This commit is contained in:
hakansa
2025-03-04 18:29:29 +03:00
committed by GitHub
parent bcc5824980
commit 60ffe0dc87
46 changed files with 160 additions and 124 deletions

View File

@ -0,0 +1,24 @@
package process
import (
"os/user"
"github.com/shirou/gopsutil/v3/process"
log "github.com/sirupsen/logrus"
)
func isProcessOwnedByCurrentUser(p *process.Process) bool {
processUsername, err := p.Username()
if err != nil {
log.Errorf("get process username error: %v", err)
return false
}
currUser, err := user.Current()
if err != nil {
log.Errorf("get current user error: %v", err)
return false
}
return processUsername == currUser.Username
}