code: public void copyAccessControlEntries(CmsRequestContext context, CmsResource source, CmsResource destination)
      throws CmsException, CmsSecurityException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          try {
              checkOfflineProject(dbc);
              checkPermissions(dbc, source, CmsPermissionSet.ACCESS_READ, true, CmsResourceFilter.ALL);
              checkPermissions(dbc, destination, CmsPermissionSet.ACCESS_CONTROL, true, CmsResourceFilter.ALL);
              m_driverManager.copyAccessControlEntries(dbc, source, destination, true);
          } catch (Exception e) {
              CmsRequestContext rc = context;
              dbc.report(
                  null,
                  Messages.get().container(
                      Messages.ERR_COPY_ACE_2,
                      rc.removeSiteRoot(source.getRootPath()),
                      rc.removeSiteRoot(destination.getRootPath())),
                  e);
          } finally {
              dbc.clear();
          }
      }
docs: Copies the access control entries of a given resource to a destination resource.<p>
  
  Already existing access control entries of the destination resource are removed.<p>
  
  @param context the current request context
  @param source the resource to copy the access control entries from
  @param destination the resource to which the access control entries are copied
  
  @throws CmsException if something goes wrong
  @throws CmsSecurityException if the user has insufficient permission for the given resource ({@link CmsPermissionSet#ACCESS_CONTROL} required)