CheckRunUser returns false if configured run user does not match actual user that runs the app. The first return value is the actual user name. This check is ignored under Windows since SSH remote login is not the main method to login on Windows.
(runUser string)
| 40 | // runs the app. The first return value is the actual user name. This check is ignored |
| 41 | // under Windows since SSH remote login is not the main method to login on Windows. |
| 42 | func CheckRunUser(runUser string) (string, bool) { |
| 43 | if IsWindowsRuntime() { |
| 44 | return "", true |
| 45 | } |
| 46 | |
| 47 | currentUser := osutil.CurrentUsername() |
| 48 | return currentUser, runUser == currentUser |
| 49 | } |
no test coverage detected