Re: Object level permissions implementation

2013-02-06 Thread Jani Tiainen
That's something I had in mind also. And I think that is quite a best thing to do. 6.2.2013 18:09, bobhaugen kirjoitti: I'm not sure this is the best way to do it, but for what I think is a similar situation, I created a template tag and a model instance method. The template tag asks the model

Re: Object level permissions implementation

2013-02-06 Thread bobhaugen
I'm not sure this is the best way to do it, but for what I think is a similar situation, I created a template tag and a model instance method. The template tag asks the model instance method whether the user has permission. Here's the template tag: https://github.com/bhaugen/localecon/blob/mast

Re: Object level permissions implementation

2013-02-05 Thread Jani Tiainen
Actually I had slightly incorrect term: I need _field_ (column) level permissions, not object (row) level permissions. 6.2.2013 8:36, Jani Tiainen kirjoitti: No it's not, it's more like enhancement to standard Django permissions that works with predefined "named" permissions. But I need to a

Re: Object level permissions implementation

2013-02-05 Thread Jani Tiainen
No it's not, it's more like enhancement to standard Django permissions that works with predefined "named" permissions. But I need to actually look data of instance and using that to check does user have permission to access instance. Let's make this slightly simpler: I have a plan model: cl

Re: Object level permissions implementation

2013-02-05 Thread Nikolas Stevenson-Molnar
If I understand correctly, that's exactly what it's for: https://code.osuosl.org/projects/object-permissions/wiki/Using#Checking-Perms _Nik On 2/4/2013 10:17 PM, Jani Tiainen wrote: > Afaik object-permission works reverse what I need - it adds spesific > permissions to groups/users to single obje

Re: Object level permissions implementation

2013-02-04 Thread Jani Tiainen
Yes, I've (a long time ago though so package may be much better now) but it doesn't give exactly what I need. Afaik object-permission works reverse what I need - it adds spesific permissions to groups/users to single object. But I need to check (mostly through foreign keys and/or spatial relat

Re: Object level permissions implementation

2013-02-04 Thread Nikolas Stevenson-Molnar
Have you had a look at this 3rd-party package? http://pypi.python.org/pypi/django-object-permissions _Nik On 2/4/2013 4:59 AM, Jani Tiainen wrote: > Hi all, > > I've in need of implementing (rather complex) object level permissions. > > I've difficulties to determine how to proceed. > > Let's ass