feat: the Financeiro profile (Dropstar, 2026-10-30)
All checks were successful
Build and deploy / Validate source (push) Successful in 14s
Build and deploy / Integration suite on a real stack (push) Successful in 4m44s
Build and deploy / Secret scan and release gate (push) Successful in 9s
Build and deploy / Publish images (push) Successful in 1m12s
All checks were successful
Build and deploy / Validate source (push) Successful in 14s
Build and deploy / Integration suite on a real stack (push) Successful in 4m44s
Build and deploy / Secret scan and release gate (push) Successful in 9s
Build and deploy / Publish images (push) Successful in 1m12s
Financeiro sees the whole board, Pagamentos, Números and Cotações, and cancels an order with its reason. It moves no card and touches no file; resolving a payment stays with Gestão and Administração. Two narrower capabilities carry it: "payments" (the Pagamentos list) and "cancel", which used to need "manage". The order panel's menu shows each profile only what it may do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -281,7 +281,7 @@ def finished_page(request: Request, before_created_at: datetime | None = None, b
|
||||
@router.get('/api/operator/payment-events')
|
||||
def payment_events(state: Literal['open','resolved','all'] = 'open',
|
||||
offset: int = Query(default=0, ge=0),
|
||||
limit: int = Query(default=20, ge=1, le=100), user=Depends(can('manage'))):
|
||||
limit: int = Query(default=20, ge=1, le=100), user=Depends(can('payments'))):
|
||||
"""Payments that needed a person, newest first: open ones to act on, resolved ones as history."""
|
||||
where = {'open': 'AND resolved_at IS NULL', 'resolved': 'AND resolved_at IS NOT NULL', 'all': ''}[state]
|
||||
with db.connect() as c:
|
||||
@@ -611,7 +611,7 @@ def release_files(c, uploads):
|
||||
|
||||
|
||||
@router.post('/api/operator/orders/{uid}/cancel')
|
||||
def cancel_order(uid: UUID, body: Resolution, user=Depends(can('manage'))):
|
||||
def cancel_order(uid: UUID, body: Resolution, user=Depends(can('cancel'))):
|
||||
"""A paid order leaves the board but keeps its payment and history. Nothing
|
||||
is refunded here (that is done at the provider); Tiny is told, so the
|
||||
order is cancelled there too while it was not invoiced (app/tiny.py)."""
|
||||
|
||||
Reference in New Issue
Block a user