Hi David, 

Thanks for your response! As you suggested, I've been experimenting with 
ignoring the security constraints via the Pagemanager constructor (I use the 
DatabasePageManager btw). This seems to work when editing the existing 
Pagemanager. The problem is that I need two separate Pagemanagers; the standard 
Pagemanager with security enabled when normal pages are accessed and a 
secondary pagemanager for the menu that ignores the security constraints. I've 
tried to add a second pagemanager for the menu-related queries. This doesn't 
seem to work (the security constraints are still applied). I think this is due 
to the DatabasePageManagerCache which is the same for both Pagemanagers. Do you 
have any suggestion for duplicating or getting around this single 
cache-instance?

Thanks in advance.

Thierry



> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: menu displaying unauthorized items
> Date: Tue, 23 Sep 2008 19:21:59 -0700
> 
> 
> On Sep 16, 2008, at 9:00 AM, Thierry de Kok wrote:
> > In our portal application, we need to display a navigation menu of  
> > all pages and folders in the current subsite. The elements shown in  
> > the menu should also contain pages/folders that the user cannot  
> > access because he/she is not authorized. When a user navigates to  
> > one of these pages, a certain login-screen should be displayed. As I  
> > understand it, the default behavior of the portal is to filter the  
> > pages/folders in the menu according to the security constraints. How  
> > can this be overridden to show all pages/folders?
> 
> It depends on how you configure your site. By removing (or never  
> adding) all security constraints on your pages, you can remove all  
> security checks. Another quick way to test this, edit your page- 
> manager.xml Spring configuration in the WEB-INF/assembly directory:
> 
>    <bean id="org.apache.jetspeed.page.PageManager"
>         name="pageManager"
>         class="org.apache.jetspeed.page.psml.CastorXmlPageManager">
>         <constructor-arg index="0"><ref bean="IdGenerator"/></ 
> constructor-arg>
>         <constructor-arg index="1"><ref bean="DocumentHandlerFactory"/ 
>  ></constructor-arg>
>         <constructor-arg index="2"><ref bean="FolderHandler"/></ 
> constructor-arg>
>         <constructor-arg index="3"><ref bean="PageFileCache"/></ 
> constructor-arg>
>         <!-- permissions security enabled flag, default=false -->
>         <constructor-arg index="4"><value>false</value></constructor- 
> arg>
>         <!-- constraints security enabled flag, default=true -->
>         <constructor-arg index="5"><value>false</value></constructor- 
> arg>
>    </bean>
> 
> Set both constructor-args 4 and 5 to false. This should disable all  
> security checks.
> 
> Now to display all pages in the site in a portlet, you could take a  
> look at the Site Manager portlet. It has a preference for mounting the  
> root:
> 
>          <preference>
>              <name>root</name>
>              <value>/__subsite-root/_hostname/localhost/</value>
>          </preference>
> 
> There is also the SitemapView portlet that can help, see sitemap.vm  
> for an example
> 
> To create a menu with each and every folder, link and page, I think  
> you will need to use the JSCookMenu decorator as an example. It uses  
> Javascript to handle subdirectory-based menus
> We don't have a working example of a menu displaying each and folder  
> and page in every subdirectory, because it could get quite large  
> depending on the depth of your site
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

_________________________________________________________________
Probeer Live Search: de zoekmachine van de makers van MSN!
http://www.live.com/?searchOnly=true

Reply via email to