Re: Filter question

Janne Jalkanen <[email protected]>
Newsgroups gmane.comp.java.jspwiki.user
Message-ID <[email protected]>
How about implementing your own AclManager?

/Janne

On 19 Jul 2007, at 15:49, Murray Altheim wrote:

> I'm starting to think maybe a page filter is the wrong way to approach
> this. I've discussed this a bit with Janne, and here's the problem:
>
> I want to have a wiki that has some public pages and some private
> pages. After some thinking and discussion, it seems that the best
> way to do this is have one private wiki that is edited by the club
> members, with a small subset of the private pages marked as "public".
> These are simply listed on a page called PermittedPages (which might
> get renamed PublicPages).
>
> The trick here is that then there's a *second* wiki engine whose
> sole purpose is a public, read-only access to the same repository
> of pages as the private wiki, but if this public wiki engine is
> ever asked for a non-public page it returns a 403-style error
> page/message (e.g., "sorry, this page is only available to club
> members."). With interwiki links we hope to minimize the hassles
> of having two wikis -- the users would never deal with two sets
> of pages or any sync problems. There'd just be a list of public
> pages to maintain.
>
> Hence the development of the PermittedPagesFilter. But given that
> the filter is really overkill, processing-wise, it may not be the
> right solution. I.e., we don't ever need to look into the page
> content as if this were a spam filter, we just need to check the
> page name against the permitted list.
>
> I'm wondering if there's a better place to put this hook, somewhere
> to intercept a page request and check to see that its content is
> permitted. This would also (potentially) need to check to see that
> any plugin-based content is permitted as well, though in our case
> there will be nobody editing the public set of pages who would
> maliciously include private information on the public pages, but
> it'd be nice to have that enforced programmatically.
>
> So I'm scanning through the code trying to think of perhaps a
> better place than a filter for this functionality. Perhaps
> somewhere in workflow? It's just a page name check against a
> list.
>
> Murray
>
> Terry Steichen wrote:
>> If it only took a few minutes, you should pat yourself on the  
>> back. (Maybe that's pretty potent cold medicine?) The idea of  
>> reaching through the cache to the underlying 'real' page is  
>> something that a number of folks (self included) have tripped up  
>> on.  (And, in my case at least, it took me quite a bit more than  
>> minutes to noodle it out.)
>> Murray Altheim wrote:
>>> Well, after banging my head against a wall for a few minutes the
>>> answer came clear. I just need to use
>>>
>>>   String name = context.getRealPage();
>>>
>>> to get the name of the included page... *sigh* ...and the cold
>>> medicine is not working either.
>>>
>>> Murray
>>>
>>> I wrote:
>>>> Hi,
>>>>
>>>> I'm developing a new filter called a PermittedPageFilter that will
>>>> use two wiki pages: one to provide a list of permitted pages and
>>>> a second to serve as an error page. Any page on the permitted list
>>>> is passed through the filter with no change; the contents of the
>>>> error page are returned for any page not on the permitted list.
>>> [...]
>>>> How do I permit LeftMenu and its ilk to pass through the filter
>>>> but halt access to a page? Maybe I shouldn't be using a filter?
>
>
> ...................................................................... 
> .....
> Murray Altheim <murray07 at altheim.com>                            
> ===  = =
> http://www.altheim.com/murray/                                      
> = =  ===
> SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk                
> = =  = =
>
>       Boundless wind and moon - the eye within eyes,
>       Inexhaustible heaven and earth - the light beyond light,
>       The willow dark, the flower bright - ten thousand houses,
>       Knock at any door - there's one who will respond.
>                                       -- The Blue Cliff Record
> _______________________________________________
> This is the Jspwiki-users mailing list, in which we discuss the  
> stable release (even-numbered, 2.4.x, 2.6.x), and user-issues. For  
> development discussion, please join jspwiki-dev.
> http://ecyrd.com/cgi-bin/mailman/listinfo/jspwiki-users
> http://www.jspwiki.org/JSPWikiMailingList
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.