Here is a patch that allows a node to protect its files when its node_access permissions get changed. For example, in Acidfree, when a user say that they want to mark an image node as private, the actual node is protected by the node_access mechanism. But the actual image files in the filemanager are not protected unless we have some way of moving them from public to private.

Robb and I have worked on this solution and come up with this proposed patch. Please look at it and apply it if you agree with it.

Comments

vhmauery’s picture

StatusFileSize
new7.75 KB

Here is an updated version of the patch that fixes a filesystem consistancy problem when moving files around between public and private.

Note that this patch does not include the honor max files patch that is listed in bug http://drupal.org/node/39105 and is the updated patch that fixes http://drupal.org/node/38477

ccourtne’s picture

Status: Needs review » Fixed

Code is merged into my working tree. Will be included in next check in. I will need help testing as I do not use this functionality directly.

vhmauery’s picture

I have been shipping this patch with Acidfree since I posted it here, so it has had a bit of testing out in the wild. That's not to say the codes is perfect, but that it seems to be working so far.

Anonymous’s picture

Status: Fixed » Closed (fixed)