Re: [Zope3-dev] Principal Comparison and/or References

2006-02-05 Thread Stephan Richter
On Friday 13 January 2006 07:35, Gary Poster wrote: > It might be reasonable to add a bit to the IPrincipal interface that   > __eq__ is provided and uses id to compare.  That seems reasonable to   > me, but maybe others have qualms.  Care to write a mini-proposal? ;-) You have my +1 vote. Regard

Re: [Zope3-dev] Principal Comparison and/or References

2006-01-13 Thread Jeff Shell
On 1/13/06, Gary Poster <[EMAIL PROTECTED]> wrote: > > Comparing the id attribute works. Is it reasonable to assume that > > zapi.principals().getPrincipal(request.principal.id) should return the > > same principal as request.principal? And thus if > > somerecord['creator_id'] == request.principal.

Re: [Zope3-dev] Principal Comparison and/or References

2006-01-13 Thread Gary Poster
On Jan 13, 2006, at 12:18 AM, Jeff Shell wrote: ... With all of the other principal / group mini-proposals going on, does there need to be a way to strongly (if that's the right word) compare a principal looked up from an id that came out of... well, somewhere (a transaction log record, a strin

[Zope3-dev] Principal Comparison and/or References

2006-01-12 Thread Jeff Shell
I found an issue with zope.app.undo's ZODBUndoManager wherein it only could undo principal transactions if the principal in the request came from the global principal registry. I tried patching our copy by changing it to look up the principal of a transaction record from zapi.principals() (gets the