4 Replies Latest reply on Oct 25, 2004 8:27 PM by Bill Burke

    Class level @RunAs is ignored

    Igor Fedorenko Newbie

      ... and here is a patch to fix this


      Index: RunAsSecurityInterceptor.java
      ===================================================================
      RCS file: /cvsroot/jboss/jboss-ejb3/src/main/org/jboss/ejb3/security/RunAsSecurityInterceptor.java,v
      retrieving revision 1.3
      diff -u -r1.3 RunAsSecurityInterceptor.java
      --- RunAsSecurityInterceptor.java 22 Jun 2004 02:41:22 -0000 1.3
      +++ RunAsSecurityInterceptor.java 18 Oct 2004 17:00:42 -0000
      @@ -23,6 +23,9 @@
      protected RunAsIdentity getRunAsIdentity(Invocation invocation)
      {
      RunAs runAs = (RunAs) invocation.resolveAnnotation(RunAs.class);
      + if (runAs == null) {
      + runAs = (RunAs) invocation.resolveClassAnnotation(RunAs.class);
      + }
      if (runAs == null) return null;
      RunAsIdentity runAsRole = new RunAsIdentity(runAs.value(), null);
      return runAsRole;



      BTW, there is no standard way to recover caller's principal hidden by RunAs, is there?