[xwiki-users] strange access rights phenomena
I have a few pages in my wiki, that "insist" on denying view rights from registered users. These pages are generated by form, using a template, following the todo app example. they should be created with view for all. edit rights are set by calling: #setEditors($obj) ############ permissions ################################################ ######## allowEdit ##################################################### ## set rights to allow creator and contributors to edit #macro(allowEdit $users) #if($xwiki.checkAccess($doc.getFullName(),"edit")) <!-- allowEdit (desObj) $doc $users --> #set ($rights = $doc.getObject("XWiki.XWikiRights", true)) #set ($result = $rights.set("levels", "edit")) #set ($result = $rights.set("users", $users)) #set ($result = $rights.set("allow", 1)) $doc.save() #end #end ########## setEditors ################################################## ## set owner, contributors, and edit rights ######################################################################### #macro(setEditors $obj) #set ($ownr = $obj.Owner) #if ((!$ownr || $ownr == "" ) && !$doc.getURL.endWith("ClassSheet")) #set ($needRefresh = true) #set ($ownr = $doc.getCreator()) #if (!$ownr || $ownr == "") #set ($ownr = $context.user) #end $doc.set("Owner",$ownr,$obj) #end #set ($contributors = $obj.Contributors) ##if ($context.user == $ownr) #set($editors = $contributors+","+$ownr) <!-- Editors: $editors --> #allowEdit($editors) ##end #end ## setEditors ################################################## For some reason this doesn't always work. Furthermore, for some pages (but not all), view rights are denied. I try to set them right, and they revert to their problem state. For example, in http://patternlanguagenetwork.myxwiki.org/xwiki/bin/view/Patterns/VisualNarr... I set view on for all, but when I leave the page and come back, that right has disappeared. ___________________________ Yishay Mor, Researcher, London Knowledge Lab http://www.lkl.ac.uk/people/mor.html http://www.google.com/calendar/embed?src=yishaym%40gmail.com +44-20-78378888 x5737
participants (1)
-
Yishay Mor