Simply error surfacing

This commit is contained in:
Theodor S. Midtlien
2026-09-25 11:14:34 +02:00
parent ec3a20e979
commit 1939f44bcd
22 changed files with 332 additions and 47 deletions
+4
View File
@@ -25,6 +25,10 @@ func IsConsoleUser(id Identity) bool {
return guardConsoleLookup(id, isConsoleUser)
}
// consoleLookup is a variable so a test can decide whether a caller is at the
// console without the machine running it having a seat of its own.
var consoleLookup = IsConsoleUser
// guardConsoleLookup runs a platform lookup and turns a panic out of it into
// "cannot confirm".
func guardConsoleLookup(id Identity, lookup func(Identity) bool) (atConsole bool) {