feat: the Administrador may release orders to Finalizado too
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m34s
Build and deploy / Secret scan and release gate (push) Successful in 4s
Build and deploy / Publish images (push) Successful in 1m1s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m34s
Build and deploy / Secret scan and release gate (push) Successful in 4s
Build and deploy / Publish images (push) Successful in 1m1s
D-29 keeps the release with the Revisor, so nobody in the room releases their own print; the Administrador, Dropstar's own login, may release as well (the user, 2026-10-28). Gestao, Designer and Operador still cannot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<div class="pagehead"><h1>Usuários</h1><button class="btn primary" id="new-user" type="button">Novo usuário</button></div>
|
||||
<p class="faint stats-note">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.</p>
|
||||
<section class="statbox"><table class="log"><thead><tr><th scope="col">Nome</th><th scope="col">Perfil</th><th scope="col">Máquinas</th><th scope="col">Último acesso</th><th scope="col"></th></tr></thead><tbody id="users-list"></tbody></table></section>
|
||||
<div class="pagehead"><h2>Máquinas</h2><button class="btn" id="new-machine" type="button">Nova máquina</button></div>
|
||||
|
||||
Reference in New Issue
Block a user