0 Replies Latest reply on Aug 6, 2003 1:27 AM by Juha Lindfors

    Java

    Juha Lindfors Master

       

       MethodMetaData m = (MethodMetaData) iterator.next();
       if (m.patternMatches(methodName, params, iface))
       {
       /* If this is an unchecked method anyone can access it so
       set the result set to a role that equates to any Principal or
       Principal name and return.
       */
       if (m.isUnchecked())
       {
       result.clear();
       result.add(AnybodyPrincipal.ANYBODY_PRINCIPAL);
       break;
       }
       // Else, add all roles
       else
       {
       Iterator rolesIterator = m.getRoles().iterator();
       while (rolesIterator.hasNext())
       {
       String roleName = (String) rolesIterator.next();
       result.add(new SimplePrincipal(roleName));
       }
       }
       }
       }
      
       // If no permissions were assigned to the method return null to indicate no access
       if( result.isEmpty() )
       {
       result = null;
       }