code: protected List<CmsOrganizationalUnit> getOrgUnits() throws CmsException {
  
          List<CmsOrganizationalUnit> ret = new ArrayList<CmsOrganizationalUnit>();
          CmsRole role = null;
          if (getParamRole() != null) {
              role = CmsRole.valueOfGroupName(getParamRole());
          }
          String ou = getParamOufqn();
          if (ou == null) {
              ou = "";
          }
          if (role != null) {
              ret.addAll(OpenCms.getRoleManager().getOrgUnitsForRole(getCms(), role.forOrgUnit(ou), true));
          } else {
              ret.addAll(OpenCms.getOrgUnitManager().getOrganizationalUnits(getCms(), ou, true));
          }
          return ret;
      }
docs: Returns the list of organizational units for selection.<p>
  
  @return a list of organizational units
  
  @throws CmsException if something goes wrong