code: private void performPermissionCheck(CmsObject cms) throws CmsPermissionViolationException {
  
          if (cms.getRequestContext().getCurrentUser().isGuestUser()) {
              throw new CmsPermissionViolationException(null);
          }
      }
docs: Perform a security check against OpenCms.
  
  @param cms The OpenCms object.
  
  @throws CmsPermissionViolationException in case of the anonymous guest user