I've found a solution:
DocumentReference dr = new DocumentReference("xwiki", "XWiki",
"XWikiPreferences");
documentAccessBridge.setProperty(dr, dr, "authenticate_view", 1);
documentAccessBridge.setProperty(dr, dr, "authenticate_edit", 1);
--
View this message in context:
http://xwiki.475771.n2.nabble.com/How-to-setup-Prevent-unregistered-users-from-viewing-pages-in-config-or-programmatically-tp7598565p7598600.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs