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]