Rights Listing

Last modified by Drunk Monkey on 2023-05-05 07:34

{ {velocity} }
https://forum.xwiki.org/t/how-to-secure-users-profile-on-xwiki-with-public-space/5008/5

#set($classsName=['XWiki.XWikiGlobalRights','XWiki.XWikiRights'])

#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='') $!displayLocation end #end #end #end
LocationRightAllowUser/GroupDate
' + "$MyDoc" + '' + $rawLevel + '' + $rawAllow + '' + $rawUsers + '' + $date + '

{ {/velocity} }