mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-16 19:49:56 +00:00
16 lines
405 B
Go
16 lines
405 B
Go
package server
|
|
|
|
// interactiveUserError returns nil when there is a logged-in user session
|
|
// on the box. At the lock/login screen WTSQueryUserName is empty, which
|
|
// means there is nobody to display an approval prompt to.
|
|
func interactiveUserError() error {
|
|
sid := getActiveSessionID()
|
|
if sid == 0 {
|
|
return errNoConsoleUser
|
|
}
|
|
if !wtsSessionHasUser(sid) {
|
|
return errNoConsoleUser
|
|
}
|
|
return nil
|
|
}
|