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

Cannot use xwikivars.vm variables inside ssx

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 13.4.3
    • None
    • None
    • Unknown

    Description

       I trying to use velocity inside a ssx in order to have rules conditionally on whether the user is an admin or not.

      #if ($hasAdmin)
        rules...
      #end
      

      However this does not work: $hasadmin is null, as it appears xwikivars.vm is not loaded in this context (no matter whether the ssx is global or on demand).

       

      Are there any reason to disallow access to those global variables inside ssxs? Are there limitations for that or is it simply a bug?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cdesableau Clément Desableau
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: