7👍
Finally, I found really good stuff: Florian Apolloner wrote a howto on djangoadvent: http://djangoadvent.com/1.2/object-permissions/
Now that’s what I’m gonna use 🙂
Something useful might be as well: http://github.com/washingtontimes/django-objectpermissions (link dead as of 2011-07-18)
9👍
I used https://github.com/lukaszb/django-guardian when it was still in version 0.2 on a project and it was rather complete and bug free.
Yes I did have to write my own ‘check_permission’ view decorator as at the time it didn’t have it included yet – but at least from version 1.0 it is there.
The author was also very quick to respond to an issue I had migrating from 0.2 – overall I’ve been happy with it and hence made it part of my project skeleton template.
- Pip install Killed
- Logging Django SQL queries with DEBUG set to False
- Run Django with URL prefix ("subdirectory") – App works, but URLs broken?
- How to show database errors to user in Django Admin
- Override JSONSerializer on django rest framework
5👍
I have released a Django-app called django-rules which lets you manage per object permissions in a flexible, dynamic and scalable way. You might want to check it out.
- Is there a way to hook Django's unittest into PyUnit in eclipse?
- Django: Save user uploads in seperate folders
- How do I set default field value to value of other field in a Django model?
1👍
I tried using django-granular-permissions for a site a while ago, but was unable to get it to do what I needed (this may have been my own inability to understand what I needed to do rather than the app). Looking at the google code site’s updates tab, it looks to not have had any work done on it since Summer/Autumn last year so it may be another dead duck.
- Meta.fields contains a field that isn't defined on this FilterSet: ****
- Cleanest way to delete stale ContentTypes?
- Avoid recursive save() when using celery to update Django model fields
- Django Rest Framework custom POST URL endpoints with defined parameter (request.POST) with Swagger or other doc
- Python multiprocessing Pool hangs on ubuntu server
- Displaying django form validation errors for ModelForms
- How to correctly use assertRaises in Django
- How to access both directions of ManyToManyField in Django Admin?
- How do I execute an arbitrary script in the context of my Django project?
- How to save `LANGUAGE_CODE` to database with i18n switcher so that the language is not changed in different browsers in Django?
1👍
First of all, the main source of information is djangopackages.com’s perms grid: “A grid of all packages implementing permissions for users and groups in your Django project”. (Beware some packages are named very similarly, e.g. an ‘s’ or a dash is the only difference)
Then, reviewing each package features (considering only the somewhat-actively maintained subset), these are the main candidates:
-
django-guardian: “implementation of per object permissions as authorization backend which is supported since Django 1.2.”
pypi, repo, docs. -
django-permissions: “Generic per-object permissions for Django”. “django-permissions provides per-object permissions for Django on roles”.
pypi, original repo, most updated fork, docs. -
django-authority: “provides generic per-object-permissions for Django’s auth app.” “Django app for per-object-permissions that includes a bunch of helpers to create custom permission checks.”
pypi, original repo, most updated fork, docs.
There are others that for one reason or the other did not make the cut:
PS: This answer was written according to the current state of open source packages, more than 2 years after the question was asked. Although not too thorough, I hope this work will help those that are in the same situation I was.