feat: Gestão only pulls cards back, with a reason (Dropstar's rule D-20)
All checks were successful
Build and deploy / Validate source (push) Successful in 10s
Build and deploy / Integration suite on a real stack (push) Successful in 4m5s
Build and deploy / Secret scan and release gate (push) Successful in 10s
Build and deploy / Publish images (push) Successful in 1m33s

Dropstar's internal rules of 2026-10-26: the coordination pulls back, never
forward, always with a reason. The Gestão profile now sends orders to
Correção from any stage and steps them back, and no longer moves them
forward. Admin, Dropstar's own login, keeps every move but Finalizado, which
stays the Revisor's (D-29).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-27 09:16:00 -03:00
parent 19b8b8c509
commit f77de40b7f
4 changed files with 25 additions and 14 deletions

View File

@@ -132,17 +132,21 @@ CAPABILITIES = {
'integrations': {'superadmin'},
}
# Who moves which card (Dropstar's flow, 2026-10-23): 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.
# Admin and Gestão make every other move, Correção included. A step back
# undoes a mistaken move: open to whoever may make the move it undoes.
# 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
# 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.
MOVES = {
'designer': {('rec', 'tra'), ('rec', 'cor'), ('tra', 'cor'), ('cor', 'rec'), ('cor', 'tra')},
'operador': {('tra', 'imp'), ('imp', 'rev')},
'revisor': {('rev', 'fin')},
}
MANAGERS = ('superadmin', 'admin', 'gestao')
ADMINS = ('superadmin', 'admin')
COORDINATION = ('gestao',)
MANAGERS = ADMINS + COORDINATION
RELEASERS = ('revisor', 'superadmin')
MOVERS = MANAGERS + tuple(MOVES)
@@ -154,7 +158,9 @@ def may_move(role, from_state, to_state, back=False):
return role in MANAGERS or (to_state, from_state) in MOVES.get(role, ())
if to_state == 'fin':
return role in RELEASERS
return role in MANAGERS or (from_state, to_state) in MOVES.get(role, ())
if to_state == 'cor' and role in COORDINATION:
return True
return role in ADMINS or (from_state, to_state) in MOVES.get(role, ())
def may_reorder(role, state):