I don't know how to do from Groovy, but maybe your use-case would be
easier to implement by hiding the document ?
  Hi All,
 I want to set the view  deny permission on specific page for group
 XWikiAllGroup through groovy script. This is my groovy script i tried
 Document docSetSearchableRights=xwiki.getDocument("Xwiki.User1")
      if(docSetSearchableRights!=null)
          {
   com.xpn.xwiki.api.Object
 rightsToSearchObject=docSetSearchableRights.newObject("XWiki.XWikiRights")
   rightsToSearchObject.set("groups", "XWiki.XWikiAllGroup")
   rightsToSearchObject.set("levels", "view")
   rightsToSearchObject.set("allow", "0") // also tried value 2 but
does
 not work.
   docSetSearchableRights.save()
          }
 Above i am trying to set view deny permission to group XWiki.XWikiAllGroup
 on page Xwiki.User1. But when i go access rights section of User1 page, i
 do not see deny permission set on view for group XWikiAllGroup.
 For information, The reason i am doing it is i do not want user profiles
 visible in serach results. i was able to do it from xwiki ui   by edit the
 access rights of that  page  and deny the view permission of that user
 profile page to XWikiAllGoup . But in the question, i am trying to do it
 from groovy script.
 _______________________________________________
 users mailing list
 users(a)xwiki.org
 
http://lists.xwiki.org/mailman/listinfo/users