[
http://jira.jboss.com/jira/browse/JBSEAM-1333?page=all ]
Shane Bryzak closed JBSEAM-1333.
--------------------------------
Resolution: Cannot Reproduce Bug
I've tested this, and while it did produce an ugly long stack trace, it did redirect
correctly to the error page i had configured in pages.xml. The one situation I believe
that this won't redirect correctly is when the security exception is thrown during the
RENDER_RESPONSE phase.
Methods annotated with @Restrict("#{s:hasPermission cause
uncaught Auth Exception
---------------------------------------------------------------------------------
Key: JBSEAM-1333
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1333
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.2.1.GA
Environment: JBoss 4.0.5GA
Seam 1.2.1GA
Reporter: Damian Harvey
Assigned To: Shane Bryzak
If I have a method annotated with a permission eg:
@Restrict("#{s:hasPermission('vesselHome','persist',vesselHome.instance)}")
and an unauthorised User tries to access this method then the resulting
org.jboss.seam.security.AuthorizationException is not intercepted as per the entry in
pages.xml and is propagated to the browser.
pages.xml:
<exception class="org.jboss.seam.security.AuthorizationException">
<redirect view-id="/secure/home.xhtml">
<message>#{messages['org.jboss.seam.security.AuthorizationException']}</message>
</redirect>
</exception>
method:
@Name("myObjectHome")
public class MyObjectHome extends EntityHome<Vessel> {
@Override
@Transactional
@Restrict("#{s:hasPermission('vesselHome','persist',vesselHome.instance)}")
public String persist() {
String status = super.persist();
return status;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira