Examples of doesUserHaveRole()


Examples of org.jboss.security.RealmMapping.doesUserHaveRole()

      {
         return ((RunAsIdentity)principal).doesUserHaveRole(set);
      }
      else
      {
         return rm.doesUserHaveRole(principal, set);
      }
   }


}
View Full Code Here

Examples of org.jboss.security.RealmMapping.doesUserHaveRole()

/*  98 */     if ((principal instanceof RunAsIdentity))
/*     */     {
/* 100 */       return ((RunAsIdentity)principal).doesUserHaveRole(set);
/*     */     }
/*     */
/* 104 */     return rm.doesUserHaveRole(principal, set);
/*     */   }
/*     */ }

/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
* Qualified Name:     org.jboss.aspects.security.SecurityContext
View Full Code Here

Examples of org.jboss.security.RunAsIdentity.doesUserHaveRole()

         {
            // Check that the run-as role is in the set of method roles
            if (callerRunAsIdentity instanceof RunAsIdentity)
            {
               RunAsIdentity rai = (RunAsIdentity) callerRunAsIdentity;
               if (rai.doesUserHaveRole(roles) == false)
               {
                  String msg = "Insufficient permissions, runAsPrincipal=" + rai.getName() + ", requiredRoles=" + roles
                        + ", runAsRoles=" + rai.getRunAsRoles();
                  log.error(msg);
                  throw new SecurityException(msg);
View Full Code Here

Examples of org.jboss.security.RunAsIdentity.doesUserHaveRole()

         {
            if(callerRunAs instanceof RunAsIdentity)
            {
               RunAsIdentity callerRunAsIdentity = (RunAsIdentity) callerRunAs;
               // Check that the run-as role is in the set of method roles
               if (callerRunAsIdentity.doesUserHaveRole(methodRoles) == false)
               {
                  String method = this.ejbMethod.getName();
                  String msg = "Insufficient method permissions, principal=" + ejbPrincipal
                  + ", ejbName=" + this.ejbName
                  + ", method=" + method + ", interface=" + this.methodInterface
View Full Code Here

Examples of org.jboss.security.RunAsIdentity.doesUserHaveRole()

      else
      {
         if(callerRunAs instanceof RunAsIdentity)
         {
            RunAsIdentity callerRunAsIdentity = (RunAsIdentity) callerRunAs;
            allowed = callerRunAsIdentity.doesUserHaveRole(set);
         }
      }
      return allowed ? AuthorizationContext.PERMIT : AuthorizationContext.DENY;
   }
}
View Full Code Here

Examples of org.jboss.security.RunAsIdentity.doesUserHaveRole()

         // The caller is using a run-as identity
         else
         {
            // Check that the run-as role is in the set of method roles
            if (callerRunAsIdentity.doesUserHaveRole(methodRoles) == false)
            {
               String method = mi.getMethod().getName();
               String msg = "Insufficient method permissions, runAsPrincipal=" + callerRunAsIdentity.getName()
                  + ", method=" + method + ", interface=" + iface
                  + ", requiredRoles=" + methodRoles + ", runAsRoles=" + callerRunAsIdentity.getRunAsRoles();
View Full Code Here

Examples of org.jboss.security.RunAsIdentity.doesUserHaveRole()

         {
            // Check that the run-as role is in the set of method roles
            if (callerRunAsIdentity instanceof RunAsIdentity)
            {
               RunAsIdentity rai = (RunAsIdentity) callerRunAsIdentity;
               if(rai.doesUserHaveRole(roles) == false)
               {
                  String msg = "Insufficient permissions, runAsPrincipal=" + rai.getName()
                  + ", requiredRoles=" + roles + ", runAsRoles=" + rai.getRunAsRoles();
                  log.error(msg);
                  throw new SecurityException(msg);
View Full Code Here

Examples of org.jboss.security.RunAsIdentity.doesUserHaveRole()

/*     */       }
/* 177 */       else if ((this.callerRunAs instanceof RunAsIdentity))
/*     */       {
/* 179 */         RunAsIdentity callerRunAsIdentity = (RunAsIdentity)this.callerRunAs;
/*     */
/* 181 */         if (!callerRunAsIdentity.doesUserHaveRole(this.methodRoles))
/*     */         {
/* 183 */           String method = this.ejbMethod.getName();
/* 184 */           String msg = "Insufficient method permissions, principal=" + this.ejbPrincipal + ", ejbName=" + this.ejbName + ", method=" + method + ", interface=" + this.methodInterface + ", requiredRoles=" + this.methodRoles + ", runAsRoles=" + callerRunAsIdentity.getRunAsRoles();
/*     */
/* 189 */           if (this.trace)
View Full Code Here

Examples of org.jboss.security.RunAsIdentity.doesUserHaveRole()

/* 241 */       allowed = am.doesUserHaveRole(this.ejbPrincipal, set);
/*     */     }
/* 244 */     else if ((this.callerRunAs instanceof RunAsIdentity))
/*     */     {
/* 246 */       RunAsIdentity callerRunAsIdentity = (RunAsIdentity)this.callerRunAs;
/* 247 */       allowed = callerRunAsIdentity.doesUserHaveRole(set);
/*     */     }
/*     */
/* 250 */     return allowed ? 1 : -1;
/*     */   }
/*     */ }
View Full Code Here

Examples of org.jboss.security.RunAsIdentity.doesUserHaveRole()

/* 144 */           SecurityException e = new SecurityException(msg);
/* 145 */           throw new EJBException("checkSecurityAssociation", e);
/*     */         }
/*     */
/*     */       }
/* 153 */       else if (!callerRunAsIdentity.doesUserHaveRole(methodRoles))
/*     */       {
/* 155 */         String method = mi.getMethod().getName();
/* 156 */         String msg = "Insufficient method permissions, runAsPrincipal=" + callerRunAsIdentity.getName() + ", method=" + method + ", interface=" + iface + ", requiredRoles=" + methodRoles + ", runAsRoles=" + callerRunAsIdentity.getRunAsRoles();
/*     */
/* 159 */         this.log.error(msg);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.