Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django-object-permissions Vs django-guardian Vs django-authority

I've found 3 row-level permission solutions for Django 1.2+

  • django-object-permissions
  • django-guardian
  • django-authority

Could someone tell if there is any recommended more than the others, what are their main differences, etc.?

like image 974
Akasha Avatar asked Jun 18 '12 12:06

Akasha


1 Answers

I'll start this by saying we use none of these for object level permission - we use our own custom method and I really wish we hadn't. If you can avoid object level permissions at all, do so, they are a pain to organise.

This is how I evaluate the 3 apps you've mentioned.

Active Development:

  1. django-guardian (1 week ago)
  2. django-object-permissions (1 year ago)
  3. django-authority (nearly 2 years ago)

API

  1. django-guardian (save an instance of a defined model)
  2. django-object-permissions (register permissions)
  3. django-authority (define classes)

The above are in order by the way.

I'd recommend guardian purely on API alone, but the fact that it is still being developed where the others aren't usually means a big win.

like image 82
Josh Smeaton Avatar answered Sep 18 '22 14:09

Josh Smeaton