[jboss-cvs] jbosssx/src/main/org/jboss/security/plugins ...

Anil Saldhana anil.saldhana at jboss.com
Tue Jul 25 13:02:51 EDT 2006


  User: asaldhana
  Date: 06/07/25 13:02:51

  Modified:    src/main/org/jboss/security/plugins 
                        AuthorizationManagerService.java
  Log:
  JBAS-2624: Additional method doesUserHaveRole
  
  Revision  Changes    Path
  1.8       +15 -4     jbosssx/src/main/org/jboss/security/plugins/AuthorizationManagerService.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: AuthorizationManagerService.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosssx/src/main/org/jboss/security/plugins/AuthorizationManagerService.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- AuthorizationManagerService.java	20 Jul 2006 19:58:52 -0000	1.7
  +++ AuthorizationManagerService.java	25 Jul 2006 17:02:51 -0000	1.8
  @@ -39,7 +39,7 @@
   import org.jboss.util.CachePolicy;
   import org.jboss.util.TimedCachePolicy;
   
  -//$Id: AuthorizationManagerService.java,v 1.7 2006/07/20 19:58:52 asaldhana Exp $
  +//$Id: AuthorizationManagerService.java,v 1.8 2006/07/25 17:02:51 asaldhana Exp $
   
   /**
    *  Service that provides Authorization capabilities.
  @@ -48,7 +48,7 @@
    *  this can be changed via the authorizationManagerClassName property.
    *  @author <a href="mailto:Anil.Saldhana at jboss.org">Anil Saldhana</a>
    *  @since  Jan 3, 2006 
  - *  @version $Revision: 1.7 $
  + *  @version $Revision: 1.8 $
    */
   public class AuthorizationManagerService 
   extends ServiceMBeanSupport
  @@ -120,7 +120,17 @@
       */
      public boolean doesUserHaveRole(String roleName)
      { 
  -      return false;
  +      String str = "Use getAuthorizationManager method and then call doesUserHaveRole";
  +      throw new IllegalStateException(str);
  +   } 
  +   
  +   /**
  +    * @see AuthorizationManager#doesUserHaveRole(Principal, Set)
  +    */
  +   public boolean doesUserHaveRole(Principal principal, Set roles)
  +   {
  +      String str = "Use getAuthorizationManager method and then call doesUserHaveRole";
  +      throw new IllegalStateException(str);
      } 
      
      //ServiceMBeanSupport methods
  @@ -257,4 +267,5 @@
            log.debug("setSecurityConfigService failed", e2);
         }
      } 
  +
   }
  
  
  



More information about the jboss-cvs-commits mailing list