On 11/30/06, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 11/27/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote:
> > I'm not sure that this should be a function however. It may also make
> > sense as a Manager and/or QuerySet method.
>
> It *feels* like something that'd make sense as a manager method; maybe
> call 'QuerySetFilter' to 'AuthorizationManager' or some
> shortened/similar version, and just override its 'filter' method to do
> the magical extensible auth filtering.
>
> That would fit in well, I think, with the precedent of the CurrentSiteManager.

I hadn't thought of that. This is probably something we want to make
sure to call, so I wonder if it would even make sense to have this
custom Manager's filter method take user and permission as required
positional arguments. I'll take a closer look at that angle.

> Also, am I just up too late or is there a bug at line 186 of the
> generic-auth test suite? That feels like it should be 'func =
> self.registry.get(types, None)'...

Yep, it should. It should probably raise an exception as well if it
can't find match in the registry. No match means that something wasn't
registered properly, not that there shouldn't be any security.

Joseph

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to