jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Louis.Mast...@log-net.com
Subject Code to filter pages by ACL
Date Wed, 13 Jul 2011 16:54:49 GMT
OK, I'm being a bit lazy, but can anyone point me to some code that, given 
a list of all pages in a wiki, using ACLs, will filter out pages that the 
user can not see (does not have view permission).  Basically, I don't even 
want them to see the names in my list.

So far I have:

for( Iterator i = pages.iterator(); i.hasNext(); )
{
        WikiPage wp = ((WikiPage) i.next());
        Acl pageACL = aclManager.getPermissions(wp);
        if(pageACL!=null && !pageACL.isEmpty()) {
                if(?????) {
                        show page here
                }
        }
}

Thanks,
Lou

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message