Repository navigation
Feat/role expedicionario - #590
Merged
Merged
Conversation
… lembretes e evidências
…ipa e aos próprios registros
edvaldoszy
approved these changes
Nov 10, 2026
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.
Description
tipo_usuario_id = 4), criado por migration com id fixo.created_by), via regras CASL comconditions.AutorizaExpedicionarioMiddlewareroda depois doauthorize.Changelog
src/database/migration/20261109120000_adiciona_tipo_usuario_expedicionario.ts: insere(4, 'EXPEDICIONARIO')emtipos_usuarios(idempotente) e ajusta a sequence.src/middlewares/tokens-middleware.js: constanteTIPOS_USUARIOS.EXPEDICIONARIO.src/library/auth/createRules.ts: regras do expedicionário; exportaCURADOR,OPERADOReEXPEDICIONARIO.src/application/AutorizaExpedicionarioMiddleware.ts: novo middleware de participação e autoria.src/application/expedicionarioAlvos.ts: resolvedores que descobrem a expedição e o autor de cada rota (evento, evidência, lembrete, evidência de lembrete).src/application/{evento,evidencia,lembrete}/index.ts: registram o middleware nas rotas de escrita.src/domain/expedicao/ExpedicaoCollection.tsesrc/infrastructure/ExpedicaoCollectionKnexAdapter.ts: novoisParticipant(expedicaoId, usuarioId).src/routes/locais.js: liberaGET /locais-coletaeGET /locais-coleta/:idpara o expedicionário.test/integration/expedicionario/expedicionario-http.test.ts: 18 cenários de autorização, incluindo a regressão do curador.test/integration/setup/curador-auth.ts: helper genéricocreateUsuarioAuthecreateExpedicionarioAuth.test/integration/setup/global-setup.ts: seed do tipo 4.Notes
migration:applyem produção.