code: private void checkOfflineAccess(CmsObject cms) throws CmsSearchException {
  
          // If an offline index is being selected, check permissions
          if (!CmsProject.ONLINE_PROJECT_NAME.equals(getProject())) {
              // only if the user has the role Workplace user, he is allowed to access the Offline index
              try {
                  OpenCms.getRoleManager().checkRole(cms, CmsRole.ELEMENT_AUTHOR);
              } catch (CmsRoleViolationException e) {
                  throw new CmsSearchException(
                      Messages.get().container(
                          Messages.LOG_SOLR_ERR_SEARCH_PERMISSION_VIOLATION_2,
                          getName(),
                          cms.getRequestContext().getCurrentUser()),
                      e);
              }
          }
      }
docs: Checks if the current user is allowed to access non-online indexes.<p>
  
  To access non-online indexes the current user must be a workplace user at least.<p>
  
  @param cms the CMS object initialized with the current request context / user
  
  @throws CmsSearchException thrown if the access is not permitted