From: Scott M S. <st...@us...> - 2005-02-05 23:31:46
|
User: starksm Date: 05/02/05 15:31:37 Modified: src/main/org/jboss/ejb/plugins SecurityInterceptor.java Log: Include the ejbName in the Insufficient method permissions exception msg. Revision Changes Path 1.51 +6 -2 jboss/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java Index: SecurityInterceptor.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- SecurityInterceptor.java 31 Dec 2004 02:57:31 -0000 1.50 +++ SecurityInterceptor.java 5 Feb 2005 23:31:36 -0000 1.51 @@ -31,7 +31,7 @@ * @author <a href="on...@ib...">Oleg Nitz</a> * @author <a href="mailto:Sco...@jb...">Scott Stark</a>. * @author <a href="mailto:Tho...@jb...">Thomas Diesler</a>. - * @version $Revision: 1.50 $ + * @version $Revision: 1.51 $ */ public class SecurityInterceptor extends AbstractInterceptor { @@ -227,7 +227,9 @@ { Set userRoles = realmMapping.getUserRoles(principal); String method = mi.getMethod().getName(); + BeanMetaData beanMetaData = container.getBeanMetaData(); String msg = "Insufficient method permissions, principal=" + principal + + ", ejbName=" + beanMetaData.getEjbName() + ", method=" + method + ", interface=" + iface + ", requiredRoles=" + methodRoles + ", principalRoles=" + userRoles; SecurityException e = new SecurityException(msg); @@ -242,7 +244,9 @@ if (callerRunAsIdentity.doesUserHaveRole(methodRoles) == false) { String method = mi.getMethod().getName(); - String msg = "Insufficient method permissions, runAsPrincipal=" + callerRunAsIdentity.getName() + BeanMetaData beanMetaData = container.getBeanMetaData(); + String msg = "Insufficient method permissions, principal=" + principal + + ", ejbName=" + beanMetaData.getEjbName() + ", method=" + method + ", interface=" + iface + ", requiredRoles=" + methodRoles + ", runAsRoles=" + callerRunAsIdentity.getRunAsRoles(); SecurityException e = new SecurityException(msg); |