-- acl prava pre read only admina rtv_*

-- vytvorenie novych opravneni
INSERT INTO acl_high (opgroup, opname, name)
	SELECT opgroup, 'read' AS opname, REPLACE(name,'spravovať','vidieť') AS name
	FROM acl_high
	WHERE SUBSTR(opgroup,1,4)='rtv_' AND opname='admin';

-- priradenie tychto opravneni pre skupinu 'RegioTV admin pasiv'
INSERT INTO acl (acl_high, acl_role)
	SELECT ah.id AS acl_high, r.id AS acl_role
	FROM acl_high ah, acl_role r
	WHERE r.name='RegioTV admin pasiv'
	AND SUBSTR(ah.opgroup,1,4)='rtv_' AND ah.opname='read';
