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

Cannot use the security script service to check rights at wiki level

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.3
    • Fix Version/s: 6.4-milestone-1
    • Component/s: Model
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Easy
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Put this in the content of a wiki page:

      $services.security.authorization.hasAccess('view', 'wiki:xwiki')
      $services.security.authorization.hasAccess('view', 'space:xwiki:Main')
      $services.security.authorization.hasAccess('view', 'xwiki:Main.WebHome')
      

      The first call doesn't work.

        Attachments

          Activity

            People

            • Assignee:
              mflorea Marius Dumitru Florea
              Reporter:
              mflorea Marius Dumitru Florea
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: