On 11/19/2010 02:15 PM, Chris Wagner wrote:
> Hello,
>
> Is is possible to programatically detect whether or not anonymous users can
> view a document on the wiki?
yup. $xwiki.hasAccessLevel("view", "XWiki.XWikiGuest", "Document.ToCheck")
http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/api/XWiki.html#hasAccessLevel%28java.lang.String,%20java.lang.String,%20java.lang.String%29
http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting#HBindings
Here are links to the javadoc for all of the default bindings.
Caleb
> I have a macro that creates a list of documents
> and I would like to exclude documents that are visible only to logged-in
> users.
>
> Thank you,
> Chris
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users