feat: Integrações buttons only for the superadmin; the folder downloads in Arte recebida by default
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 3m7s
Build and deploy / Secret scan and release gate (push) Successful in 4s
Build and deploy / Publish images (push) Successful in 47s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-20 09:55:31 -03:00
parent c8857a5bf5
commit df30046027
6 changed files with 52 additions and 33 deletions

View File

@@ -40,6 +40,13 @@ def run():
su.call('/operator/users', {'name': 'X', 'email': f'x-{tag}@example.test', 'role': 'superadmin',
'password': PASSWORD}, operator=True, expected=422)
admin = signed_in(emails['admin'])
# Integrações: an administrator sees what is on and off; only the superadmin acts there.
assert 'integrations' not in admin.call('/operator/me')['can']
assert 'integrations' in su.call('/operator/me', operator=True)['can']
for path in ('/operator/tiny/connect', '/operator/tiny/test', '/operator/mercadopago/check',
'/operator/mail/test', '/operator/backup/run'):
admin.call(path, {}, expected=403)
admin.call('/operator/events', expected=403)
admin.call('/operator/users', {'name': 'Op', 'email': emails['operador'], 'role': 'operador',
'password': PASSWORD, 'machines': [uv]})
admin.call('/operator/users', {'name': 'Vendas', 'email': emails['vendedor'], 'role': 'vendedor',