Condition Macro
Allow the content to execute based on whether the user has the permission to do so. |
Type | XAR |
Category | Application |
Developed by | |
Active Installs | 1 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
Condition macro allow the content to execute based on whether the user has the rights to do so.
Usage
Check if the current user has edit rights on the current document
You can use the current document to try out your wiki's features.
{{/condition}}
Check if the current user has edit rights on an other document in a subwiki
You can use the [[Sandbox space>>mywiki:Sandbox.WebHome]] to try out your wiki's features.
{{/condition}}
You can specify several access rights
...
{{/condition}}
Parameters definition
Name | Value | Default value | Description |
---|---|---|---|
rights | String | The rights that will be checked, this parameter is mandatory. | |
reference | String | The current document | This is the reference of a document on which the verification will be done. |
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki
Dependencies
Dependencies for this extension (org.xwiki.contrib:macro-condition 1.0):