return groups; }
else if ( PrivilegeResolver.getInstance().hasPriv(s, g, subj, AccessPrivilege.READ) ) { msg += "READ"; can = true; } else if ( PrivilegeResolver.getInstance().hasPriv(s, g, subj, AccessPrivilege.ADMIN) ) { msg += "ADMIN"; can = true; } else if ( PrivilegeResolver.getInstance().hasPriv(s, g, subj, AccessPrivilege.UPDATE) ) { msg += "UPDATE"; can = true; } else if ( PrivilegeResolver.getInstance().hasPriv(s, g, subj, AccessPrivilege.OPTIN) ) { msg += "OPTIN"; can = true; } else if ( PrivilegeResolver.getInstance().hasPriv(s, g, subj, AccessPrivilege.OPTOUT) ) { msg += "OPTOUT"; can = true; } if (can == false) { GrouperLog.debug(LOG, s, msg + "no"); throw new InsufficientPrivilegeException( s.getSubject().getId() + " does not have " + priv + " on '" + g.getName() + "'" ); } GrouperLog.debug(LOG, s, msg); }
  protected Set canVIEW(GrouperSession s, Set candidates) {    Set             groups  = new LinkedHashSet();    Iterator        iter    = candidates.iterator();    while (iter.hasNext()) {      Group g = (Group) iter.next();      g.setSession(s);      try {        // Can we view the group        this.canVIEW(s, g, s.getSubject());        groups.add(g);      }      catch (InsufficientPrivilegeException eIP) {        // Ignore      }      }    return groups;  }