Re: Automatic capture of user ids for auditing
Maciej Wisniowski <[email protected]> Wed, 07 Nov 2007 22:17:32 +0100
| Newsgroups | gmane.comp.web.zope.database |
|---|---|
| Message-ID | <[email protected]> |
>> * The idea of "extending the DA pass the current ZOPE user" seems >> cleaner. For me, changing DA seems to add 'audit' fields seems nasty. What if you will have one specific table that doesn't need audit fields (this may happen when you're using authentication sources that rely on DB and in many other cases). I think that much cleaner might be to create something like AuditEnabledZSQLMethods that will render to sql that contains necessary statements and use it instead of ZSQLMethods when necessary. Above assumes that you'll create a Zope Product that (possibly) inherits from ZSQLMethods. You may take a look at CCZSQLMethods as they are example of extending ZSQLMethods. -- Maciej Wisniowski