docs: protected void checkWritePermissionsInFolder(CmsDbContext dbc, CmsResource folder) throws CmsDataAccessException {
  
          ResultSet res = null;
          PreparedStatement stmt = null;
          Connection conn = null;
  
          CmsUUID projectId = dbc.getRequestContext().getCurrentProject().getUuid();
  
          // first read all subresources with ACEs
          List<CmsResource> resources = new ArrayList<CmsResource>();
          try {
              conn = m_sqlManager.getConnection(dbc);
              stmt = m_sqlManager.getPreparedStatement(conn, projectId, "C_RESOURCES_READ_WITH_ACE_1");
              stmt.setString(1, folder.getRootPath() + "%");
              res = stmt.executeQuery();
  
              while (res.next()) {
                  resources.add(createResource(res, projectId));
              }
          } catch (SQLException e) {
              throw new CmsDbSqlException(
                  Messages.get().container(Messages.ERR_GENERIC_SQL_1, CmsDbSqlException.getErrorQuery(stmt)),
                  e);
          } finally {
              m_sqlManager.closeAll(dbc, conn, stmt, res);
          }
  
          // check current user write permission for each of these resources
          Iterator<CmsResource> itResources = resources.iterator();
          while (itResources.hasNext()) {
              CmsResource resource = itResources.next();
              try {
                  m_driverManager.getSecurityManager().checkPermissions(
                      dbc.getRequestContext(),
                      resource,
                      CmsPermissionSet.ACCESS_WRITE,
                      false,
                      CmsResourceFilter.ALL);
              } catch (CmsException e) {
                  throw new CmsDataAccessException(e.getMessageContainer(), e);
              }
          }
  
          // then check for possible jsp pages without permissions
          CmsResourceFilter filter = CmsResourceFilter.ALL;
          itResources = readTypesInResourceTree(
              dbc,
              projectId,
              folder.getRootPath(),
              CmsResourceTypeJsp.getJspResourceTypeIds(),
              filter.getState(),
              filter.getModifiedAfter(),
              filter.getModifiedBefore(),
              filter.getReleaseAfter(),
              filter.getReleaseBefore(),
              filter.getExpireAfter(),
              filter.getExpireBefore(),
              CmsDriverManager.READMODE_INCLUDE_TREE).iterator();
          while (itResources.hasNext()) {
              CmsResource resource = itResources.next();
              try {
                  m_driverManager.getSecurityManager().checkPermissions(
                      dbc.getRequestContext(),
                      resource,
                      CmsPermissionSet.ACCESS_WRITE,
                      false,
                      CmsResourceFilter.ALL);
              } catch (CmsException e) {
                  throw new CmsDataAccessException(e.getMessageContainer(), e);
              }
          }
      }