[jboss-user] [JBoss Seam] - not redirecting to security_error.xhtml

efabiano do-not-reply at jboss.com
Sat May 12 11:20:26 EDT 2007


HI,

I´ve started using seam security in advanced mode.
In fact I´m using dynamic role as you can see at
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045165#4045165

I´ve configured my pages.xml with this exceptions

<exception class="org.jboss.seam.security.NotLoggedInException">
  |         <redirect view-id="/login.xhtml">
  |             <message>You must be logged in to perform this action</message>
  |         </redirect>
  |     </exception>
  |     
  |     <exception class="org.jboss.seam.security.AuthorizationException">
  |         <end-conversation/>
  |         <redirect view-id="/security_error.xhtml">
  |             <message>You do not have the necessary security privileges to perform this action.</message>
  |         </redirect>
  |     </exception>

Then, i´ve configured my components.xml with this events

<event type="org.jboss.seam.notLoggedIn">
  |     <action expression="#{redirect.captureCurrentView}"/>
  | </event>
  |     
  | <event type="org.jboss.seam.postAuthenticate">
  |     <action expression="#{redirect.returnToCapturedView}"/>
  | </event>

Finally, i´ve annotated a method (corcontroller seam component) with @Restrict.

When I do a simple test  calling this method in a view (denying authorization) I got an authorization check failed(AuthorizationException). According to pages.xml, it should be redirected to view security_error.xhtml, but what really appears is an error with a stack trace. Looking at the console we can see this message:

SERV ERROR RENDERING VIEW COR.XTML

and after,

Authorization check failed

seam version: 1.2.1
jboss version: 4.0.5
operational system: windows 2003


tks in advance

emerson fabiano

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

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




More information about the jboss-user mailing list