Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
12.7
-
None
-
Unknown
-
Description
The class javadoc of org.xwiki.like.internal.LikeRight states:
This right is allowed by default and implies Login and View rights.
but getImpliedRights() returns null, so the like right implies no other right.
The javadoc was accurate when the class was added (XWIKI-17508), where getImpliedRights() returned LOGIN and VIEW leaked read access – but the javadoc was not updated, so it has described the opposite of the code ever since.
getDefaultState() does return RuleState.ALLOW, so "allowed by default" is correct. The javadoc could also mention that the right targets wiki, space and document entities (getTargetedEntityType() returns Right.XWIKI_SPACE_DOCUMENT).