mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-06 05:29:07 +02:00
Address CodeRabbit review and fix CI on embedded-vnc
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
package server
|
||||
|
||||
// consoleHasInteractiveUser returns true 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. Callers
|
||||
// should decline without waiting on the broker in that case.
|
||||
func consoleHasInteractiveUser() bool {
|
||||
// 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 false
|
||||
return errNoConsoleUser
|
||||
}
|
||||
return wtsSessionHasUser(sid)
|
||||
if !wtsSessionHasUser(sid) {
|
||||
return errNoConsoleUser
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user