code: private void checkPermissionsForMassEdit(CmsObject cms, String siteRoot) throws CmsException {
  
          String originalSiteRoot = cms.getRequestContext().getSiteRoot();
          try {
              cms.getRequestContext().setSiteRoot(siteRoot);
              checkPermissionsForMassEdit(cms);
          } finally {
              cms.getRequestContext().setSiteRoot(originalSiteRoot);
          }
      }
docs: Checks that the user has permissions for a mass edit operation in a given site.<p>
  
  @param cms the current CMS context
  @param siteRoot the site for which the permissions should be checked
  
  @throws CmsException if something goes wrong