code: private boolean isAllowedUser(CmsUser user) throws CmsException {
  
          if (user.getOuFqn().startsWith(m_cms.getRequestContext().getOuFqn())) {
              return true;
          }
          return OpenCms.getRoleManager().getRolesOfUser(m_cms, user.getName(), m_ou, true, true, false).size() > 0;
      }
docs: Checks is it is allown for the current user to see given user.<p>
  
  @param user to be checked
  @return boolean
  @throws CmsException exception