chore: call gate checks the active profile only

Checking every profile made a denied call unrecoverable — the process quits
before the operator can change it, and no profile switch could get back in.
Gating on the active profile alone keeps "--profile <other>" as a way back in,
and still turns away a denied operator whose active call is the blocked one.
This commit is contained in:
2026-08-04 23:21:40 +02:00
parent d12cfe94cd
commit 246d9d1b6a
+6 -11
View File
@@ -986,17 +986,12 @@ func (a *App) startup(ctx context.Context) {
} }
a.settings.SetProfile(active.ID) a.settings.SetProfile(active.ID)
a.settingsScoped.Store(true) // per-profile settings reads (GetUIPref…) are now safe a.settingsScoped.Store(true) // per-profile settings reads (GetUIPref…) are now safe
// Evaluate the build call gate across every profile's station callsign, before // Evaluate the build call gate on the ACTIVE profile's station callsign, before
// any further wiring. A denied call exits here, silently. // any further wiring. A denied call exits here, silently. Only the active
{ // profile is checked (not every profile) so that "--profile <other>" is always
gate := []string{active.Callsign} // a way back in — a blocked call is otherwise unrecoverable, since the process
if list, lerr := a.profiles.List(a.ctx); lerr == nil { // quits before the operator can change it.
for _, p := range list { enforceCallGate(active.Callsign)
gate = append(gate, p.Callsign)
}
}
enforceCallGate(gate...)
}
// US county resolver — its own local SQLite (data/uls.db), populated on demand // US county resolver — its own local SQLite (data/uls.db), populated on demand
// by DownloadULSCounties. Opening (creating an empty store) is cheap and never // by DownloadULSCounties. Opening (creating an empty store) is cheap and never
// fatal: county resolution simply stays inert until the operator downloads it. // fatal: county resolution simply stays inert until the operator downloads it.