[jboss-user] [JBoss Seam] - Re: Security & Authentificaiton of a Seam Application

gavin.king@jboss.com do-not-reply at jboss.com
Wed Jan 31 21:31:45 EST 2007

"markfoerstein" wrote : "toni" wrote : How can I render parts of the page depending on the user role with this kind of security setup?
  |   | 
  |   | I would like to hide or show menu items depending on whether or not the user belongs to a certain rule.
  | Same here toni ;-)


<h:commandButton value="Self Destruct" action="#{machine.selfDestruct}" rendered="#{s:hasPermission('machine','selfDestruct',machine)}"/>

(Using 1.1.5, of course.)

If you don't have instance-level security, the following simpler form will suffice:

<h:commandButton value="Self Destruct" action="#{machine.selfDestruct}" rendered="#{s:hasPermission('machine','selfDestruct')}"/>

And if all you have is role-based security, the following is even simpler:

<h:commandButton value="Self Destruct" action="#{machine.selfDestruct}" rendered="#{s:hasRole('hero')}"/>

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009171#4009171

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009171

More information about the jboss-user mailing list