Hi, Joseph and I were talking earlier this evening about how to replace the permission wrapper context to allow for his generic auth and my row level permission. We could not determine a way to expand the current context processor to allow an object to be passed (if you have any ideas, please let us know).
So what I have done is create a template tag to check for permissions. It is basically an if statement focused on permissions. The syntax is {% load auth %} {% if_has_perm [not] (permission_codename) [object] %} .... {% end_if_has_perm %} The params in square brackets are optional, you do need to pass on the permission codename. Right now, the permission codename has to be in the format that is accepted by user.has_perm (which is app_label.codename). It can also have an {% else %} tag imbetween the start and end. I did not implement any AND or OR into it, I think it would be too busy if they were put in. The user is assumed to be the current user Any thoughts on this? Do you think this is an ideal way of checking for permissions? Or do you know a method we can use to pass the object to the perm wrapper? Thanks, Chris PS: To see the actual code, check revision 3589 in per-object-permission branch. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---