Skip to content
Snippets Groups Projects
Commit 4b275bcb authored by Eduard Moraru's avatar Eduard Moraru
Browse files

XWIKI-12171: Add a script right to manage script macro execution permissions

- Fixed the edit panels since they were not using the UIx mechanism as they were probably forgotten in the refactoring. They were failing to execute because they were using the deprecated #displayPanel macro.
parent 00b8e3f9
No related branches found
No related tags found
No related merge requests found
......@@ -17,9 +17,27 @@
#end
#set ($editorPanels = $editorPanels.split(','))
<div id="editPanels" class="panels editor">
## Convert the list of panels to panel (UIExtension) IDs
#set ($panelIDList = [])
#foreach ($panel in $editorPanels)
#displaypanel($panel)
#set ($panelDocumentReference = $services.model.resolveDocument($panel.trim(), 'currentmixed'))
#set ($panelStringReference = $services.model.serialize($panelDocumentReference, 'default'))
#set ($discard = $panelIDList.add($panelStringReference))
#end
## Get the Panel UIExtensions by filtering on the above computed panel ID list
#set ($panelUIExtensions = $services.uix.getExtensions('platform.panels', {'select' : "$stringtool.join($panelIDList, ',')"}))
## Display each configured panel that the current user has view on
#foreach ($panelUIExtension in $panelUIExtensions)
## We need to set this because the panelheader macro used in panels needs it
#set ($paneldoc = $xwiki.getDocument($panelUIExtension.id))
#if ($paneldoc && $!xwiki.hasAccessLevel('view', $paneldoc))
$services.rendering.render($panelUIExtension.execute(), "xhtml/1.0")
#end
#end
</div>
#if ($editor == 'wysiwyg')
<script type="text/javascript">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment