[jboss-user] [JBoss Seam] - Re: Help about permissions with seam-security

gaboo do-not-reply at jboss.com
Sat Feb 3 22:43:56 EST 2007


I can get permission to works with inline restrictions like this :

in xtml page :
<h:outputText value="TEST permission (test/bwa)"
  |     	rendered="#{s:hasPermission('test','bwa', null)}"/>
  | <br/>
  | <h:outputText value="TEST permission (test/toto)"
  | 	rendered="#{s:hasPermission('test','toto', null)}"/>
  | <br/>
  | <h:outputText value="TEST role admin"
  | 	rendered="#{s:hasRole('admin')}"/>
  | 

rules :

  | rule TestBwaRule
  | when
  | 	c: PermissionCheck(name == "test", action == "bwa")
  | 	Role(name == "admin")
  | then
  | 	c.grant();
  | end;  
  | 
  | 
  | rule TestBwaRule1
  | when
  | 	c: PermissionCheck(name == "test", action == "toto")
  | then
  | 	c.grant();
  | end;


But no way with page level restriction in pages.xml.
Not sure what is wrong. Would  be good to add such an example in seamspace ?

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

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



More information about the jboss-user mailing list