Refactor inscription management access control to implement granular permissions for transaction actions. Update CSS for improved button layout and alignment, ensuring consistent styling across action items. Increment version code to 4.72.816 to reflect these changes.

This commit is contained in:
2026-07-13 17:53:55 -04:00
parent 6c56fb7af7
commit e52c3b7b45
5 changed files with 183 additions and 47 deletions

View File

@ -0,0 +1,59 @@
-- MSIN-4401 — Droits granulaires fiche Gestion : facture, transaction, renvoi
-- Prérequis : MSIN-eve-acces-v2-phase2-multi-granular.sql (perms base)
-- Idempotent. Safe pilote.
--
-- Note : kit propriétaire (role_grants_all) n'a PAS besoin de ces lignes.
SET NAMES utf8mb4;
INSERT INTO `inscriptions_eve_permissions`
(`perm_key`, `perm_group`, `perm_scope`, `perm_label_fr`, `perm_label_en`,
`perm_description_fr`, `perm_description_en`, `perm_phase`, `perm_actif`, `perm_tri`)
VALUES
('inscriptions_gestion.invoice', 'inscriptions', 'action',
'Gestion inscription : facture', 'Registration mgmt: invoice',
'Afficher la facture (numero de commande) depuis la fiche',
'Show invoice (order number) from the sheet',
2, 1, 138),
('inscriptions_gestion.transaction', 'inscriptions', 'action',
'Gestion inscription : transaction', 'Registration mgmt: transaction',
'Afficher le resume de transaction depuis la fiche',
'Show transaction summary from the sheet',
2, 1, 139),
('inscriptions_gestion.renvoi', 'inscriptions', 'action',
'Gestion inscription : renvoyer confirmation', 'Registration mgmt: resend confirmation',
'Renvoyer la confirmation au participant depuis la fiche',
'Resend confirmation to the participant from the sheet',
2, 1, 140)
ON DUPLICATE KEY UPDATE
`perm_group` = VALUES(`perm_group`),
`perm_scope` = VALUES(`perm_scope`),
`perm_label_fr` = VALUES(`perm_label_fr`),
`perm_label_en` = VALUES(`perm_label_en`),
`perm_description_fr` = VALUES(`perm_description_fr`),
`perm_description_en` = VALUES(`perm_description_en`),
`perm_phase` = VALUES(`perm_phase`),
`perm_actif` = 1,
`perm_tri` = VALUES(`perm_tri`);
/* Kits terrain : ops = les 3 ; readonly = lecture facture+transaction */
INSERT INTO inscriptions_eve_role_permissions (role_id, perm_key)
SELECT r.role_id, p.perm_key
FROM inscriptions_eve_roles r
CROSS JOIN (
SELECT 'inscriptions_gestion.invoice' AS perm_key
UNION ALL SELECT 'inscriptions_gestion.transaction'
UNION ALL SELECT 'inscriptions_gestion.renvoi'
) p
WHERE r.role_code = 'gestion_ops'
ON DUPLICATE KEY UPDATE perm_key = VALUES(perm_key);
INSERT INTO inscriptions_eve_role_permissions (role_id, perm_key)
SELECT r.role_id, p.perm_key
FROM inscriptions_eve_roles r
CROSS JOIN (
SELECT 'inscriptions_gestion.invoice' AS perm_key
UNION ALL SELECT 'inscriptions_gestion.transaction'
) p
WHERE r.role_code IN ('gestion_readonly', 'gestion_statut')
ON DUPLICATE KEY UPDATE perm_key = VALUES(perm_key);