Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-24689

Wrong javadoc on LikeRight: it does not imply Login and View rights

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 12.7
    • Like
    • 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).

      Attachments

        Activity

          People

            ecojocariu Eleni
            ecojocariu Eleni
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: