Files
backend/database/migrations/104_roll_calls_staff_permissions.sql
T
Alireza HassaniandCursor eb0644e6c1 Grant roll-call permissions to editor and viewer staff.
Roll call is a staff work log, so smaller team roles can use it when the module is on.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-10 12:33:57 +03:30

9 lines
281 B
SQL

-- Roll call is for every staff role, including editor and viewer.
INSERT INTO role_permissions (role_id, permission_id)
SELECT r.id, p.id
FROM roles r
JOIN permissions p ON p.slug LIKE 'roll_calls.%'
WHERE r.slug IN ('editor', 'viewer', 'business_staff')
ON CONFLICT DO NOTHING;