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

{{permission}} macro to allow the content to execute based on whether the user has the permission to do so

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Unresolved
    • Major
    • None
    • None
    • Rendering, Security
    • None
    • Trivial

    Description

      Usage example:

      {{permission types="view,edit,admin"}}
      something
      {{/permission}}
      

      Features:

      • Ability to specify one or several permissions

      For example the following that we currently have:

      {{velocity wiki="true"}}
      #if($hasEdit) You can use the [[Sandbox space>>Sandbox.WebHome]] to try out your wiki's features. #end
      {{/velocity}}
      

      would get replaced by:

      {{permission types="edit"}}
      You can use the [[Sandbox space>>Sandbox.WebHome]] to try out your wiki's features.
      {{/permission}}
      

      The idea is to make it nicer and cleaner for simple users to use advanced features (including the ability to add this macro from the WYSIWYG editor).

      Note: We should not add too many options since we don't want to replace the scripting way. The idea is just to find the most common use cases and provide an easy way for simple users to use it.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: