Created
June 21, 2012 18:38
-
-
Save eduardolundgren/2967661 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<sql id="com.liferay.portal.service.persistence.RoleFinder.findByC_R_C_A"> | |
<![CDATA[ | |
SELECT | |
{Role_.*} | |
FROM | |
ResourceBlockPermission | |
INNER JOIN | |
ResourceBlock ON | |
(ResourceBlock.resourceBlockId = ResourceBlockPermission.ResourceBlockId) | |
INNER JOIN | |
Role_ ON | |
(Role_.roleId = ResourceBlockPermission.roleId) | |
INNER JOIN | |
ResourceAction ON | |
(ResourceAction.name = ResourceBlock.name) | |
WHERE | |
(ResourceBlock.companyId = ?) AND | |
(ResourceBlock.name = ?) AND | |
(ResourceBlock.resourceBlockId = ?) AND | |
(ResourceAction.actionId = ?) AND | |
(MOD(INTEGER_DIV(ResourceBlockPermission.actionIds, ResourceAction.bitwisevalue), 2) = 1) | |
ORDER BY Role_.name ASC | |
]]> | |
</sql> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment