[Jboss-cvs] JBossAS SVN: r56845 - branches/JBoss_4_0_4_GA_EJB3_RC9/aspects/src/main/org/jboss/aspects/security
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Sep 14 09:59:14 EDT 2006
Author: bill.burke at jboss.com
Date: 2006-09-14 09:59:13 -0400 (Thu, 14 Sep 2006)
New Revision: 56845
Modified:
branches/JBoss_4_0_4_GA_EJB3_RC9/aspects/src/main/org/jboss/aspects/security/AuthenticationInterceptor.java
Log:
pop subject correctly (merge from branch40)
Modified: branches/JBoss_4_0_4_GA_EJB3_RC9/aspects/src/main/org/jboss/aspects/security/AuthenticationInterceptor.java
===================================================================
--- branches/JBoss_4_0_4_GA_EJB3_RC9/aspects/src/main/org/jboss/aspects/security/AuthenticationInterceptor.java 2006-09-14 13:58:37 UTC (rev 56844)
+++ branches/JBoss_4_0_4_GA_EJB3_RC9/aspects/src/main/org/jboss/aspects/security/AuthenticationInterceptor.java 2006-09-14 13:59:13 UTC (rev 56845)
@@ -81,7 +81,10 @@
{
SecurityContext.currentDomain.set(oldDomain);
// so that the principal doesn't keep being associated with thread if the thread is pooled
- SecurityAssociation.popSubjectContext();
+ // only pop if it's been pushed
+ RunAsIdentity callerRunAsIdentity = SecurityActions.peekRunAsIdentity();
+ if (authenticationManager == null || callerRunAsIdentity == null)
+ SecurityActions.popSubjectContext();
if (invocation.getMetaData("security", "principal") != null)
{
More information about the jboss-cvs-commits
mailing list