AnsweredAssumed Answered

display information only to admin user

Question asked by alpha on Apr 10, 2007
Latest reply on Apr 16, 2007 by alpha
hi guys,

i am trying to customize browse.jsp to display specific information only to admin user. I want hide content-panel to user other than admin, and in the space panel i would like to hide columns modified and actions to all users other than admin.

For the first point, i've managed to do such when using tag <a:booleanEvaluator> as follows

<a:booleanEvaluator value="#{NavigationBean.currentUser.admin == true}" id="evalAcontent">
        <%– Details - Content –%>
and it works fine

But for the second, it doesn't work well with <a:booleanEvaluator>, here is the code :
<%– Modified Date column for details/icons view modes –%>
<a:booleanEvaluator value="#{NavigationBean.currentUser.admin == true}" id="evalMod">
<a:column id="col7" style="text-align:left">
<f:facet name="header">
<a:sortLink id="col7-sort" label="#{msg.modified}" value="modified" styleClass="header"/>
<h:outputText id="col7-txt" value="#{r.modified}">
<a:convertXMLDate type="both" pattern="#{msg.date_time_pattern}" />

<%– Space Actions column –%>
<a:column id="col9" actions="true" style="text-align:left">
<f:facet name="header">
<h:outputText id="col9-txt" value="#{msg.actions}"/>

<r:actions id="col9-acts1" value="space_browse" context="#{r}" showLink="false" styleClass="inlineAction" />
<a:menu id="spaces-more-menu" itemSpacing="4" image="/images/icons/more.gif" tooltip="#{msg.more_actions}" menuStyleClass="moreActionsMenu">
<r:actions id="col9-acts2" value="space_browse_menu" context="#{r}" />
if i connect with a non-admin user it works (information are not displayed) but when i connect as admin no information is displayed !!!

how can i do to make this work correctly?
I have also tried to used rendered attribute for tag <a:column>, as follows:
<a:column id="col7" style="text-align:left" rendered="#{NavigationBean.currentUser.admin == true}">
do you recommend this?
Any help is appreciated.