django-object-permissions 1.4.6

A method for adding object-level or row-level permissions

This is an implementation of Object Permissions, a.k.a. row level permissions. Object Permissions allow you to assign a permission to an instance of any Model in your django project. This app provides a authentication backend that works with Django >= 1.2.

This specific implementation includes the ability to assign permissions to Users and UserGroups. Later versions may include the ability to create PermissionGroups and ObjectPermissionGroups.

Installation

There are several ways to install Object Permissions.

Object Permissions ships a standard distutils setup.py. A classic invocation to install from setup.py might be:

$ python setup.py install

You may need to add sudo in order to install to the system Python.

$ sudo python setup.py install

We also have Object Permissions on PyPI, so it can be installed using pip. (easy_install also works, but we do not recommend easy_install. Just use pip.)

$ pip install django-object-permissions

If you are installing Object Permissions directly into a Django app, and want to distribute Object Permissions with your app, simply copy the object_permissions folder into your Django project.

Configuring Your Django Project

  1. Add "object_permissions" to INSTALLED_APPS
  2. Add "object_permissions.backend.ObjectPermBackend" to AUTHENTICATION_BACKENDS.
  3. Run ./manage.py syncdb

if South is enabled for your project you will need to create tables using migrate

3b) Run ./manage.py migrate

Using Object Permissions

First, register some permissions onto a Model in your models.py. This can only be done once per model; see registration.py for more information.

>>> from object_permissions import register
>>> register(['permission'], Model)

Now, that permission can be granted, revoked, or checked for any instance of that Model.

>>> user.grant('permission', object)
>>> user.revoke('permission', object)
>>> user.has_perm('permission', object)
>>> group.grant('permission', object)
>>> group.revoke('permission', object)

Authors

Object Permissions was originally implemented by Peter Krenesky at the Oregon State University Open Source Lab (OSUOSL). This release is maintained by Ken Lett.

Author

Ken Lett

Pip

django-object-permissions==1.4.6

Classifiers

  • Topic :: Security
  • License :: OSI Approved :: MIT License
  • Framework :: Django
File Type Python Version Uploaded On Downloads
django-object-permissions-1.4.6.tar.gz Source June 6, 2013 4,499
Version Release Date
1.4.6 June 6, 2013
1.4.5 March 26, 2013
1.4.4 June 13, 2012
1.4.3 May 31, 2012
1.4.2 Nov. 18, 2011
1.4.1 June 18, 2011
1.4 June 17, 2011
1.3.1 March 5, 2011
1.3 Feb. 3, 2011
1.2 Dec. 20, 2010
1.1 Dec. 10, 2010
1.0 Nov. 29, 2010
0.9 Nov. 17, 2010
Date Package Version Action
Nov. 4, 2014, 1:31 p.m. django-object-permissions 1.1 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions 0.9 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions 1.0 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions 1.2 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions 1.3.1 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions 1.3 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions 1.4.6 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions 1.4.5 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions 1.4.4 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions 1.4.3 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions 1.4.2 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions 1.4.1 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions 1.4 Release Created
Nov. 4, 2014, 1:31 p.m. django-object-permissions Package Created