ipn/ipnlocal: make pricing restriction message for Tailnet Lock clearer

Fixes tailscale/corp#24417

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:
Anton Tolchanov
2025-06-18 11:38:18 +01:00
committed by Anton Tolchanov
parent 49ae66c10c
commit a91fcc8813
2 changed files with 14 additions and 6 deletions

View File

@@ -1970,6 +1970,11 @@ func (h *Handler) serveTKAInit(w http.ResponseWriter, r *http.Request) {
return
}
if !h.b.NetworkLockAllowed() {
http.Error(w, "Tailnet Lock is not supported on your pricing plan", http.StatusForbidden)
return
}
if err := h.b.NetworkLockInit(req.Keys, req.DisablementValues, req.SupportDisablement); err != nil {
http.Error(w, "initialization failed: "+err.Error(), http.StatusInternalServerError)
return