[development] files owned by uid, patch review request.
dries.buytaert at gmail.com
Tue May 8 06:27:04 UTC 2007
On 07 May 2007, at 21:13, Darrel O'Pry wrote:
>> I don't think Cog is requesting that this would be part of this
>> patch. I think he just wants to understand how this patch affects
>> feature requests like this. As in; does this patch makes it easier
>> or more difficult to implement some of the common feature requests
>> related to file handling.
> Yes I think it could be implemented, and I think it would make it
> easier. While nodes did provide a convenient sort of grouping, we
> have a group access control model in Drupal core. We use a role based
> permission system currently. With the exception of organic groups.
Thanks for the clarification.
>> What if I want the files to get deleted when the node is deleted?
>> Would they still be deleted with the proposed patch?
> No. The file remains, but is disassociated from the node. There is no
> way to guarantee the file is not in use elsewhere on your site, or
> linked from an external site, so the file remains.
> It can be modified to do so, but being able to do it sanely will
> the addition on drewish's modules column, or a hook delete for
> counting to make sure files are not in use elsewhere.
While I like the direction of your patch (I'm in favor), I think this
might warrant a bit more thought and discussion.
The current model is that when you delete a node, the files
associated with that node are also deleted -- both from the database
and from disk. With this proposed patch, the files would remain on
disk, and you'd have no way to delete them -- nor from the database,
nor from disk. (Unless maybe you use a contrib module).
How do you all feel about this? Does this drawback (if considered a
drawback) outweight the advantages of this patch?
Dries Buytaert :: http://www.buytaert.net/
More information about the development