feat(simulado): permissões + endpoints provas cursinho (Etapa 6 Cards 02+03) - #508
Merged
FernandoAlmeidaPinto merged 10 commits intoAug 2, 2026
Merged
Conversation
…sinho Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
FernandoAlmeidaPinto
deleted the
feature/etapa6-cursinho-prova-controller
branch
August 2, 2026 00:00
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.
Etapa 6 · Cards 02 + 03 — api-vcnafacul
Cadeia encadeada (Card 02 → Card 03). Define as permissões dedicadas do cursinho e expõe os endpoints proxy cursinho-scoped.
Card 02 — Permissões
visualizar/cadastrarProvasCursinhoPermissions+PERMISSION_FIELD_MAP(Record exaustivo) + novo grupoprovas_cursinhonoPERMISSION_HIERARCHY(tipoprepCourse, cadastrar ⇒ visualizar).roles(entity) + 2 campos opcionais (@IsOptional) noCreateRoleDto(evita quebrar client antigo no deploy api-antes-de-client).RoleService.createe.updatepassam a ler/persistir as 2 permissões (não entram noBASE_PERMISSIONS— prepCourse não cascateia).true.AddPermissoesProvasCursinho(2 colunastinyint NOT NULL DEFAULT 0).Card 03 —
CursinhoResolverService+CursinhoProvaControllerGET/POST /mssimulado/cursinho/prova, gated porJwtAuthGuard(401) +PermissionsGuard(403,visualizar/cadastrarProvasCursinho).CursinhoResolverServiceresolve ocursinhoIddo JWT viaCollaboratorativo (findActiveByUserIdWithPrep); sem vínculo/inativo → 403.criadorId+cursinhoIdno servidor (ignora o body); reusaProvaService.createProva(ganhou 5º param opcionalcursinhoId, retrocompatível com o fluxo admin).getAllByCursinhoproxeia pro msGET /v1/prova/cursinho/:cursinhoId.Testes
Build + testes do módulo role e simulado verdes (resolver 403, RoleService persistência+implies, controller segurança/injeção, proxy URL).
Parte da série Provas Cursinho (etapa 6).
🤖 Generated with Claude Code