code: public List<CmsOrganizationalUnit> getOrgUnitsForRole(
          CmsRequestContext requestContext,
          CmsRole role,
          boolean includeSubOus)
      throws CmsException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(requestContext);
          List<CmsOrganizationalUnit> result = null;
          try {
              result = m_driverManager.getOrgUnitsForRole(dbc, role, includeSubOus);
          } catch (Exception e) {
              dbc.report(
                  null,
                  Messages.get().container(Messages.ERR_GET_ORGUNITS_ROLE_1, role.getName(requestContext.getLocale())),
                  e);
          } finally {
              dbc.clear();
          }
          return result;
      }
docs: Returns all the organizational units for which the current user has the given role.<p>
  
  @param requestContext the current request context
  @param role the role to check
  @param includeSubOus if sub organizational units should be included in the search
  
  @return a list of {@link org.opencms.security.CmsOrganizationalUnit} objects
  
  @throws CmsException if something goes wrong