Repository navigation
feat(login): ft login --read-only - #56
Merged
Merged
Conversation
Pre-marca "Solo lectura" en /device y se niega a guardar una key que pueda escribir. whoami muestra el scope. Contrato 1.43.0 (GET /me trae scope). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fo7cm6tJ2XF1A7EL6t4KGF Doco-Brief: https://doco.to/workspaces/appfreeticket/brief?id=brief_01M73KQRZBD3XRSHWMP3Z8FW6P
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fo7cm6tJ2XF1A7EL6t4KGF Doco-Brief: https://doco.to/workspaces/appfreeticket/brief?id=brief_01M73KQRZBD3XRSHWMP3Z8FW6P
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fo7cm6tJ2XF1A7EL6t4KGF
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué cambia
ft login --read-onlyabre/devicecon?scope=read, que pre-marca "Solo lectura". Al volver, consultaGET /mey se niega a guardar la key siscopeno esread. Pasa si quien aprobó desmarcó la casilla, si--keyes una key write o si el servidor es anterior a 1.43.0. En los tres casos falla cerrado.ft whoami(multi-cuenta) muestra la columnascope. El login avisa "(read-only)".openapi.json→ 1.43.0. Es un parche mínimo (versión + schemaMe): el contenido es idéntico al de free-admin, verificado por ft-contract-impact.Depende de AppFreeticket/free-admin#1220, que agrega
scopea/mey el checkbox en/device. Mergear esa primero. Si esta sale antes,--read-onlyfalla cerrado y no se abre ningún hueco.Límite conocido: la key write que se rechaza queda viva en el backend. Nadie tiene su secreto; si se acumulan, se revocan (
ponytail:enreadOnlyRefusal).Diagrama de flujo
flowchart LR A["ft login --read-only"] --> B["browser /device?scope=read"] B --> C["GET /me"] C --> D{"scope == read"} D -->|sí| E["guarda la cuenta"] D -->|no| F["falla, no guarda"]Cómo probar
pnpm test(src/commands/auth.test.ts:withQueryconservacode; rechazawrite/undefined; aceptaread).FT_API_URL=http://admin.localhost:3000 ft login --read-only. Aprobar con la casilla marcada guarda la cuenta; desmarcada, falla sin guardar.ft whoamimuestrascope: read. Un comando de escritura (p. ej.ft events create) recibe 403.🤖 Generated with Claude Code
https://claude.ai/code/session_01Fo7cm6tJ2XF1A7EL6t4KGF