diff --git a/app/core/auth.py b/app/core/auth.py index ac490fa..4dea3dc 100644 --- a/app/core/auth.py +++ b/app/core/auth.py @@ -140,9 +140,10 @@ CAPABILITIES = { } # Who moves which card (Dropstar's flow, 2026-10-23, and their rules of -# 2026-10-26): the designer the artwork, the operator the printing, and only -# the Revisor (and we, the superadmin, for support) to Finalizado, so nobody -# releases their own print (D-29). Gestão, the coordination, pulls back and +# 2026-10-26): the designer the artwork, the operator the printing, and the +# Revisor to Finalizado, so nobody in the room releases their own print (D-29); +# Admin, Dropstar's own login, may release too (the user, 2026-10-28), and we, +# the superadmin, for support. Gestão, the coordination, pulls back and # never forward, always with a reason (D-20): a step back, or Correção. Admin, # Dropstar's own login, makes every other move. A step back undoes a mistaken # move: open to whoever may make the move it undoes. @@ -154,7 +155,7 @@ MOVES = { ADMINS = ('superadmin', 'admin') COORDINATION = ('gestao',) MANAGERS = ADMINS + COORDINATION -RELEASERS = ('revisor', 'superadmin') +RELEASERS = ('revisor', 'admin', 'superadmin') MOVERS = MANAGERS + tuple(MOVES) diff --git a/docs/CONTEXT.md b/docs/CONTEXT.md index e228711..6dba18e 100644 --- a/docs/CONTEXT.md +++ b/docs/CONTEXT.md @@ -432,9 +432,10 @@ order as the print order and "Baixar" for the room; orders that were in the queue were moved to Arte conferida with a line in their history. Who moves what (MOVES): the Designer Arte recebida to Arte conferida, asks for corrections and brings the new art back to Arte recebida or Arte conferida; -the Operador Arte conferida to Imprimindo to Revisão; only the Revisor (and -the superadmin, for support) Revisão to Finalizado, so nobody releases their -own print; Gestão, the coordination, only pulls back, always with a reason +the Operador Arte conferida to Imprimindo to Revisão; the Revisor Revisão to +Finalizado, so nobody in the room releases their own print, and the +Administrador may release too (the user, 2026-10-28; the superadmin for +support); Gestão, the coordination, only pulls back, always with a reason (rule D-20 of Dropstar's internal rules, 2026-10-26): Correção from any stage, or a step back; Admin, Dropstar's own login, every other move, including Correção straight to Revisão. A step back belongs to whoever makes diff --git a/tests/test_moves.py b/tests/test_moves.py index d2713ae..4762216 100644 --- a/tests/test_moves.py +++ b/tests/test_moves.py @@ -28,9 +28,9 @@ class MovesTest(unittest.TestCase): self.assertFalse(may_move('gestao', *pair), pair) self.assertTrue(may_move('admin', *pair), pair) - def test_only_the_revisor_releases_to_finalizado(self): + def test_the_revisor_and_the_administrator_release_to_finalizado(self): for role in ROLES: - self.assertEqual(may_move(role, 'rev', 'fin'), role in ('revisor', 'superadmin'), role) + self.assertEqual(may_move(role, 'rev', 'fin'), role in ('revisor', 'admin', 'superadmin'), role) def test_a_step_back_belongs_to_whoever_makes_the_move_it_undoes(self): self.assertTrue(may_move('operador', 'rev', 'imp', back=True)) diff --git a/tests/users_test.py b/tests/users_test.py index c7e0294..0d7d60d 100644 --- a/tests/users_test.py +++ b/tests/users_test.py @@ -155,9 +155,8 @@ def run(): # The seller only views the board (D-30): no order registered by hand either. assert seller.call('/operator/me')['can'] == ['view'] seller.call(f'/operator/quotes/{uv_q}/register', {'origin': 'atendimento', 'method': 'pix'}, expected=403) - # Only the Revisor releases to Finalizado: not even the administrator. - admin.call(f'/operator/orders/{uv_o}/move', {'state': 'fin', 'version': printed['version'], 'reason': ''}, - expected=403) + # The Revisor releases to Finalizado, and the administrator may too (2026-10-28). + assert ['rev', 'fin'] in admin.call('/operator/me')['moves'] admin.call('/operator/users', {'name': 'Confere', 'email': emails['revisor'], 'role': 'revisor', 'password': PASSWORD}) reviewer = signed_in(emails['revisor']) diff --git a/web/kanban.html b/web/kanban.html index 6825796..49b7aa5 100644 --- a/web/kanban.html +++ b/web/kanban.html @@ -116,7 +116,7 @@
Quem entra no Kanban e o que cada perfil pode fazer. Administrador: tudo, inclusive esta página. Gestão: tudo, menos usuários; no quadro só puxa para trás, com motivo (Correção ou voltar uma etapa). Designer: vê todos os pedidos, aprova e recusa o arquivo final, pede correção. - Operador: ligado a uma máquina, vê só os pedidos dela; imprime e passa para a Revisão. Revisor: confere a folha impressa e libera; é o único que manda para Finalizado. + Operador: ligado a uma máquina, vê só os pedidos dela; imprime e passa para a Revisão. Revisor: confere a folha impressa e libera para Finalizado; o Administrador também pode liberar. Vendedor: só consulta. Retrabalho: a Gestão abre, com a causa; o Administrador autoriza.
| Nome | Perfil | Máquinas | Último acesso |
|---|