Files
spsays-bff/migrations/0059_quiz_reset_permission.up.sql
T
2026-10-15 20:59:53 +05:30

7 lines
366 B
SQL

-- quizzes:reset — delete one participant's attempt so the quiz is pending
-- for them again. Granted to the seeded Admin role (Superadmin has '*';
-- Moderator and custom roles get it only when a superadmin adds it).
UPDATE admin_roles
SET permissions = array_append(permissions, 'quizzes:reset')
WHERE key = 'admin' AND NOT ('quizzes:reset' = ANY(permissions));