[jboss-cvs] JBossAS SVN: r58051 - branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/security

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Nov 3 00:02:31 EST 2006


Author: anil.saldhana at jboss.com
Date: 2006-11-03 00:02:30 -0500 (Fri, 03 Nov 2006)
New Revision: 58051

Modified:
   branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/security/SecurityActions.java
Log:
EJBTHREE-776:consider RunAsIdentity of caller

Modified: branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/security/SecurityActions.java
===================================================================
--- branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/security/SecurityActions.java	2006-11-03 05:01:42 UTC (rev 58050)
+++ branches/JEE5_TCK/ejb3/src/main/org/jboss/ejb3/security/SecurityActions.java	2006-11-03 05:02:30 UTC (rev 58051)
@@ -45,6 +45,7 @@
  * @author Scott.Stark at jboss.org
  * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
  * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @author Anil.Saldhana at jboss.org
  * @version $Revison: 1.1$
  */
 class SecurityActions
@@ -203,6 +204,18 @@
       return previousID;
    }
    
+   static RunAsIdentity peekRunAsIdentity()
+   {
+      if(System.getSecurityManager() == null)
+      {
+         return RunAsIdentityActions.NON_PRIVILEGED.peek();
+      }
+      else
+      {
+         return RunAsIdentityActions.PRIVILEGED.peek();
+      }
+   }
+   
    static void pushRunAsIdentity(RunAsIdentity principal)
    {
       if(System.getSecurityManager() == null)




More information about the jboss-cvs-commits mailing list