Skip to content

Commit

Permalink
Fixed setting ParentClass limitation for content/publish
Browse files Browse the repository at this point in the history
Current SQl wrongly copies existing ParentClass limitation from content/create to content/publish policy
  • Loading branch information
reithor committed Mar 17, 2023
1 parent 957e67a commit b666b57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/update/mysql/dbupdate-5.4.0-to-6.13.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ INSERT INTO `ezpolicy_limitation` (`identifier`, `policy_id`)
FROM `ezpolicy_limitation` AS `l0`
JOIN `ezpolicy` AS `p0` ON `l0`.`policy_id` = `p0`.`id`
JOIN `ezpolicy` AS `p1` ON `p0`.`role_id` = `p1`.`role_id` AND `p1`.`module_name` = 'content' AND `p1`.`function_name` = 'publish'
WHERE `p0`.`module_name` = 'content' AND `p0`.`function_name` IN ('create', 'edit');
WHERE `p0`.`module_name` = 'content' AND `p0`.`function_name` IN ('create', 'edit') AND `l0`.`identifier` NOT IN ('ParentOwner', 'ParentGroup', 'ParentClass', 'ParentDepth', 'ChangeOwner');

-- Create content/publish limitation values entries based on existing entries matched by limitation identifier and role
INSERT INTO `ezpolicy_limitation_value` (`limitation_id`, `value`)
Expand Down

0 comments on commit b666b57

Please sign in to comment.