You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ad...@apache.org on 2003/11/12 05:35:39 UTC
cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/ejb GeronimoSessionContext.java
adc 2003/11/11 20:35:39
Modified: modules/core/src/java/org/apache/geronimo/ejb
GeronimoSessionContext.java
Log:
Fill in implementation of getCallerPrincipal() and isCallerInRole()
Revision Changes Path
1.8 +5 -3 incubator-geronimo/modules/core/src/java/org/apache/geronimo/ejb/GeronimoSessionContext.java
Index: GeronimoSessionContext.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/ejb/GeronimoSessionContext.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- GeronimoSessionContext.java 8 Sep 2003 04:28:26 -0000 1.7
+++ GeronimoSessionContext.java 12 Nov 2003 04:35:39 -0000 1.8
@@ -76,6 +76,7 @@
import org.apache.geronimo.ejb.container.EJBPlugins;
import org.apache.geronimo.ejb.context.GeronimoUserTransaction;
import org.apache.geronimo.ejb.metadata.EJBMetadata;
+import org.apache.geronimo.security.util.ContextManager;
/**
*
@@ -139,11 +140,12 @@
}
public Principal getCallerPrincipal() {
- return null;
+ return ContextManager.getCallerPrincipal();
}
public boolean isCallerInRole(String roleName) {
- return false;
+ EJBMetadata ejbMetadata = EJBPlugins.getEJBMetadata(container);
+ return ContextManager.isCallerInRole(ejbMetadata.getName(), roleName);
}
public UserTransaction getUserTransaction() throws IllegalStateException {