Repository navigation
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…count deletion Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…and stop caching the data export Drop the ARIA menu roles (no arrow-key navigation is implemented), close the dropdown when focus leaves it, keep it inside the viewport and right-align the header controls when they wrap. Send Cache-Control: no-store on /auth/export. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Users gain `is_admin` and `blocked_at`. A `CurrentAdmin` dependency guards the new `/api/admin` endpoints, which list users and block or unblock them. Blocking revokes the user's sessions and rejects further logins; account deletion removes the role. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Admins can list, create and delete prompts under `/api/admin/prompts`. Each prompt stores the SHA-256 of its text, unique per version, so the same content cannot be published twice in one version. A prompt can only be deleted while it has no inferences. The inference loader reports repeated content as an error instead of failing. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Admins can list, create, delete and patch responses under `/api/admin/responses`. A response can be deactivated, so it is no longer shown or counted in task progress, and excluded from the ranking, so votes involving it stop counting. A response with votes or skips cannot be deleted. The ranking cache is also invalidated when a response changes, since toggling a flag does not change any id. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A new /admin page, shown only to administrators, lets them block users, manage prompts and manage inferences (activate, exclude from the ranking, delete). The session endpoint now reports `is_admin` so the header can link to it, and the API client handles empty 204 responses. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The date is the latest of the user's last login, vote and task skip, computed from existing tables, so no column or migration is needed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A deactivated prompt is no longer served and its votes stop counting in the ranking. Version selection skips inactive prompts, so deactivating the newest version falls back to the previous one, which undoes a faulty release without deleting anything. The ranking cache is invalidated on each change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The confirm and cancel buttons wrapped onto a second line, which made the row taller and shifted the rows below. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Admins can pick the YAML files produced by the inference pipeline and import them under a version. Each file is independent and follows the same rules as the command line loader: a response that already exists is skipped, a changed one is rejected, and the prompt hash recorded in the file must match the prompt text. A test checks that the parsed result equals the loader's. Files travel as JSON so no new dependency is needed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…menu Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
lequims
force-pushed
the
feat/admin-access
branch
from
November 1, 2026 17:34
d54285b to
7c68ee2
Compare
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
feat/account-menuusers.is_admin) i el bloqueig de comptes (users.blocked_at); un compte bloquejat perd les sessions i no pot tornar a entrar, i una restriccióCHECKimpedeix que un compte donat de baixa sigui administradorscripts/fes_administrador.py, que concedeix o revoca el rol i exigeix un compte existent, amb el correu verificat i no bloquejat. La migració no fa administrador ningú;GET /api/auth/sessionexposais_admin/api/admin/*per llistar usuaris (amb la darrera activitat) i bloquejar-los o desbloquejar-los, i per crear, filtrar, activar, desactivar i esborrar prompts i inferències; les llistes són paginades i l'esborrat es rebutja si hi ha inferències o votsactive(es mostra a qui avalua) iincluded_in_ranking(els seus vots compten al rànquing i a la confiança). La memòria cau del rànquing s'invalida amb les dates de modificacióprompts.content_sha256(únic per versió, amb migració que omple els existents), que impedeix repetir el mateix text dins d'una versió;scripts/carrega_inferencies.pytambé ho detectascripts/carrega_inferencies.py: cada fitxer és independent, el prompt es busca per versió i codi, les respostes idèntiques s'ometen, les que canvien una resposta existent es rebutgen i, si hi haprompt.sha256, ha de coincidir amb el text del prompt/admin) amb les pestanyes Usuaris, Prompts i Inferències, accessible només per a administradors des del menú del comptedocs/db_schema.md,docs/usuaris_autenticacio.mdi els README del backend i del frontend🤖 Generated with Claude Code