feat(32.2-02): admin consent card at /connect posts the decision and leaves for redirect_uri

- /connect route without shell and without public, so login round-trips back
- ConnectView ready state: client mark, fact box, catalog-order scope picker
  with the token-dialog * rule, Stay connected, Deny and Allow
- Allow/Deny POST /mcp/consent/{request}; the browser leaves through
  window.location.assign after refusing javascript:, data: and vbscript:
- MCPConsent, MCPConsentDecision and AccountItem type aliases
- backend::lang.mcp_connect copy in en and pl; connect page title
- smoke test: ticks, POST body, assign called, router never used
This commit is contained in:
Jakub Zych
2026-11-21 00:42:01 +01:00
parent 1d3e6df6ec
commit f46c90f7fb
7 changed files with 476 additions and 0 deletions

View File

@@ -351,6 +351,29 @@ api_tokens:
mcp_connect:
request_not_found: This connection request has expired or does not exist.
no_grantable_scopes: Choose at least one scope you can use.
page_title: Connect an agent
heading: Allow :client to use the admin as you?
subline: The agent gets your permissions, limited to the scopes you tick. It never gets more access than your own account.
signed_in_as: Signed in as
admin_with_email: ":name (:email)"
switch_account: Use another account
returns_to: Returns to
offline: Stay connected
offline_description: The agent can renew its access without asking you again. Untick it and the agent has to be allowed again when its access expires.
previously_allowed: You have allowed :client before.
allow: Allow
allowing: Allowing…
deny: Deny
returning: Returning you to :host…
continue: Continue to :host
login_hint: Sign in to finish connecting your MCP agent.
none_grantable: Your account has none of the permissions this agent asks for. Deny the request, or ask a superuser for the permissions and connect again.
expired_heading: This connection request has expired
expired_body: Connection requests are valid for a few minutes and work only once. Go back to your agent and connect again.
open_admin: Go to the admin panel
load_failed: The connection request could not be loaded. Check your connection and try again.
retry: Try again
decide_failed: Your answer could not be sent. Try again.
myaccount:
menu_label: My account
menu_description: Edit your name, email, subtitle and password, and manage your API tokens.

View File

@@ -373,6 +373,29 @@ api_tokens:
mcp_connect:
request_not_found: To żądanie połączenia wygasło albo nie istnieje.
no_grantable_scopes: Wybierz co najmniej jeden zakres, którego możesz użyć.
page_title: Połącz agenta
heading: Pozwolić aplikacji :client korzystać z panelu w Twoim imieniu?
subline: Agent otrzyma Twoje uprawnienia w granicach zaznaczonych zakresów. Nigdy nie dostanie szerszego dostępu niż Twoje konto.
signed_in_as: Zalogowano jako
admin_with_email: ":name (:email)"
switch_account: Użyj innego konta
returns_to: Wrócisz do
offline: Pozostań połączony
offline_description: Agent może odnawiać dostęp bez ponownego pytania. Po odznaczeniu trzeba będzie ponownie wyrazić zgodę, gdy jego dostęp wygaśnie.
previously_allowed: Aplikacja :client ma już Twoją zgodę.
allow: Zezwól
allowing: Zezwalanie…
deny: Odmów
returning: Wracasz do :host…
continue: Przejdź do :host
login_hint: Zaloguj się, aby dokończyć łączenie agenta MCP.
none_grantable: Twoje konto nie ma żadnego z uprawnień, o które prosi ten agent. Odmów albo poproś superużytkownika o uprawnienia i połącz się ponownie.
expired_heading: Ta prośba o połączenie wygasła
expired_body: Prośba o połączenie jest ważna kilka minut i działa tylko raz. Wróć do agenta i połącz się ponownie.
open_admin: Przejdź do panelu
load_failed: Nie udało się wczytać prośby o połączenie. Sprawdź połączenie i spróbuj ponownie.
retry: Spróbuj ponownie
decide_failed: Nie udało się wysłać odpowiedzi. Spróbuj ponownie.
myaccount:
menu_label: Moje konto
menu_description: Zmień imię, nazwisko, e-mail, podtytuł i hasło oraz zarządzaj tokenami API.