Gavin, thanks for pointing that out.  I'm obviously missing something in my 
configuration because it's not working.  I have the following (deployed to 
4.0.5.GA)

components.xml

              <security:identity 
authenticate-method="#{authenticator.authenticate}"/>
  | 
  |               <drools:rule-base name="securityRules">
  |                  <drools:rule-files>
  |                      <value>/META-INF/security-rules.drl</value>
  |                  </drools:rule-files>
  |               </drools:rule-base>
  | 
  |               <event type="org.jboss.seam.notLoggedIn">
  |                   <action expression="#{redirect.captureCurrentView}"/>
  |               </event>
  | 
  |               <event type="org.jboss.seam.postAuthenticate">
  |                   <action expression="#{redirect.returnToCapturedView}"/>
  |               </event>

pages.xml

<pages no-conversation-view-id="/organizations.xhtml">
  | 
  |   <page view-id="/organizations.xhtml">
  |     <restrict>#{identity.loggedIn}</restrict>
  |   </page>
  | 
  |   <exception class="org.jboss.seam.security.NotLoggedInException">
  |     <end-conversation/>
  |     <redirect view-id="/login.xhtml">
  |       <message>Please login</message>
  |     </redirect>
  |   </exception>
  | 
  |   <exception class="org.jboss.seam.security.AuthorizationException">
  |     <end-conversation/>
  |     <redirect view-id="/security_error.xhtml">
  |       <message>You do not have permission to do this</message>
  |     </redirect>
  |   </exception>
  | 
  | </pages>

I added some debug statements to Redirect.java and see that 
captureCurrentView() does indeed capture the view.  But when 
returnToCapturedView() is called after logging in, viewId is null.  It appears 
that the "redirect" component has gone out of scope.  Section 12.2.6 of the 
docs state:

It is important to note that login redirection is implemented as a 
conversation-scoped mechanism, meaning that for this feature to work, 
conversation propagation must be enabled until the user is successfully logged 
in.

Isn't conversation propagation enabled by default?  I don't see anything in the 
seamspace configuration that changes anything related to converation 
propagation.

Any suggestions?

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015631
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to