if (!PrivilegeResolver.getInstance().isRoot(this.s.getSubject())) { throw new InsufficientPrivilegeException("subject cannot add types");
try { PrivilegeResolver.getInstance().canADMIN(this.s, this, this.s.getSubject()); } catch (InsufficientPrivilegeException eIP) { GrouperLog.debug(LOG, this.s, eIP.getMessage()); throw eIP;
  public void deleteType(GroupType type)     throws  GroupModifyException,            InsufficientPrivilegeException,            SchemaException  {    if (!this.hasType(type)) {      throw new SchemaException("group does not have type: " + type);    }    if (!PrivilegeResolver.getInstance().isRoot(this.s.getSubject())) {      throw new InsufficientPrivilegeException("subject cannot add types");    }    if (GroupType.isSystemType(type)) {      throw new SchemaException("cannot delete system group types");    }    try {      StopWatch sw    = new StopWatch();      Session   hs    = HibernateHelper.getSession();      Set       types = this.getGroup_types();      types.remove(type);      this.setGroup_types(types);      HibernateHelper.save(this);      hs.close();      sw.stop();      EL.groupDelType(this.s, this.getName(), type, sw);    }    catch (Exception e) {      String msg = "unable to delete type: " + type + ": " + e.getMessage();      LOG.error(msg);      throw new GroupModifyException(msg);     }  } // public void deleteType(type)