I’m using XWiki for the intranet of my company and I would like to have a document with all the permissions/rights given on each page/ section. Currently we are using an Excel sheet but it’s difficult to maintain, do you have any other solution ?
When you run it, there’s a section called Show Rights which gives a complete overview of all permissions which have been set in your wiki. It’s not perfect, but it is much better than the default permission viewer IMO and I wish I’d found it sooner. Hope this helps!
This script lists all existing ‘XWiki.XWikiRights’ and ‘XWiki.XWikiGlobalRights’. Each of these objects has an account/group, the type of right and whether it is permitted or prohibited. In addition, the last modification date is displayed.
This page lists all existing '[[XWiki.XWikiRights>>XWiki.XWikiRights]]' and '[[XWiki.XWikiGlobalRights>>XWiki.XWikiGlobalRights]]'. Each of these objects has an account/group, the type of right and whether it is permitted or prohibited. In addition, the last modification date is displayed.
{{velocity}}
## https://forum.xwiki.org/t/how-to-secure-users-profile-on-xwiki-with-public-space/5008/5
#set($classsName=['XWiki.XWikiGlobalRights','XWiki.XWikiRights'])
{{html wiki='true'}}
<table id="tableid${velocityCount}" class="grid sortable filterable doOddEven">
<tr class="sortHeader">
<th>Location</th><th>Right</th><th style="min-width:9ch;">Allow</th><th>User/Group</th><th style="min-width:17ch;">Date</th>
</tr>
#foreach($className in $classsName)
#set($hql = "select distinct obj.name from BaseObject obj where obj.className='$className' order by obj.name")
#set($results = $xwiki.search($hql))
#foreach ($Page in $results)
#set($MyDoc = $xwiki.getDocument("$Page"))
#set($class = $xwiki.getClass("$className"))
## loop over all objects
#foreach($obj in $MyDoc.getObjects("$className"))
#set ($displayLocation="")
#set($discard = $MyDoc.use($obj))
#set($rawLevel = $obj.getProperty('levels').value)
#set($rawAllow = $obj.getProperty('allow').value)
#set($rawUsers = $obj.getProperty('users').value)
#set($date = $MyDoc.date)
#set($date = $xwiki.formatDate($date, "yyyy-MM-dd HH:mm:ss"))
#if($rawUsers == "")
#set($rawUsers = $obj.getProperty('groups').value)
#end
##if (($rawLevel.contains('view')) && ($rawUsers.contains('XWiki.XWikiGuest')))
#set ($displayLocation='<tr><td>' + "[[$MyDoc>>$MyDoc.fullName]]" + '</td><td>' + $rawLevel + '</td><td>' + $rawAllow + '</td><td>' + [[$rawUsers]] + '</td><td>' + $date + '</td></tr>')
$!displayLocation
##end
#end
#end
#end
</table>
{{/html}}
{{/velocity}}
@Simpel we appreciate this contribution and would be great if you could update the page with a License type from the existing list. I’m pretty sure the license you chose is not something official