Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
None
-
None
Description
In the forum module, for example, we added a specific "permission" (moderation). Its code is 64. When doing PermissionUtil.convertPermissions(64), we get an empty string, which is probably
going to get the code further down to check for no permission instead of checking for the one we want. I don't suppose JCR/JackRabbit can handle custom permissions, so these conversion methods should probably just throw an exception.
Consider the following test:
@Test
public void doesNotAccountForCustomPermissions() {
try {
final String result = PermissionUtil.convertPermissions(64);
fail("Should have failed - but returned ["+result+"] instead.");
} catch (IllegalArgumentException e) {
assertEquals("64 is not a standard permission code, please update your code to use XYZ instead.", e.getMessage());
}
}
Setting the priority to blocker to make sure this gets fixed before the release. Please reset to an appropriate priority when fixed.
Checklists
Acceptance criteria