Commits

schacki committed d5120e0

updated docs

  • Participants
  • Parent commits 8ea56bf

Comments (0)

Files changed (7)

 *bin/
 *downloads/
 *docs/_build
-*dist
+*dist
+*env

File docs/index.rst

 django-permissions
 ==================
 
-django-permissions is a generic framework for per-object permissions for Django based on roles: http://en.wikipedia.org/wiki/Role-based_access_control
+django-permissions is a generic framework for per-object permissions for Django based on roles.  
+
 
 Contents
 ========
 
 .. toctree::
-   :maxdepth: 1
+   :maxdepth: 2
    
    overview.rst
+   concepts.rst
    installation.rst
+   settings.rst
    usage/index.rst
    api.rst
 

File docs/installation.rst

 To install django-permission, proceed as following:
 
 1. Easy install it: ``$ easy_install django-permissions``
-2. Add `permissions` to `INSTALLED_APPS` within `settings.py` of your django 
-   project.
-3. Sync your database: ``$ django-admin syncdb``
+2. Add `permissions` to `INSTALLED_APPS` within `settings.py` of your django project.
+3. Add the custom backend 'permissions.backend.ObjectPermissionsBackend' to `AUTHENTICATION_BACKENDS` with in `settings.py` of your django project (after 'django.contrib.auth.backends.ModelBackend').
+4. Sync your database: ``$ django-admin syncdb``

File docs/overview.rst

-========
+============
 Overview
-========
+============
 
-* django-permissions is a generic framework for per-object permissions for
-  Django based on roles: http://en.wikipedia.org/wiki/Role-based_access_control
+django-permissions is a generic framework for per-object permissions for Django based on roles. It follows the concepts as outlined in django.contrib.auth and implements its API to provide row-level permissions. By applying the provided custom authorization backend, you can easily check a user's permissions with user.has_perm, exactly as you would do it with the django.contrib.auth. Additionally, decorators and template tags are provided for convenience.
 
-Permissions
-===========
+By default, django-permissions, is based on roles http://en.wikipedia.org/wiki/Role-based_access_control. But to cover various uses cases and reduce complexity where not required, it  can easily be customized via settings such that it does not apply the roles concept, but works with the standard Django users and groups only.
 
-* Permissions are granted to roles (and only to roles) in order to allow 
-  something to users or groups which have these roles.
+There are various alternative tools and approaches. Django itself does provide authentication and permissions, but only by content type and not by object. But Django's approach enables customized authorization backeends http://docs.djangoproject.com/en/1.2/topics/auth/#handling-object-permissions, as they are used by django-permissions. Next to django-permissions, there are other apps that provide their own approach and custom backends like django-guardian, django-authority or django-rulez.
 
-Roles
-=====
-
-* Roles are used to grant permissions. Typical roles are *Reader*, *Manager*  
-  or *Editor*.
-
-Local Roles
-===========
-
-* Local roles are roles which are assigned to users and groups for specific 
-  content objects.
-
-Users
-=====
-
-* Users are actors which may need a permission to do something within the 
-  system.
-* Users can be member of several groups.
-* User can have several roles, directly or via a membership to a group
-  (these are considered as global).
-* User can have local roles, directly or via a membership to a group. That is
-  roles for a specific object.
-* Users have all roles of their groups - global and local ones.
-* Users have all permissions of their roles - global and local ones.
-
-Groups
-======
-
-* Groups combines users together.
-* Groups can have roles (these are considered as global).
-* Groups can have local roles, that is roles for a specific object.
-* Groups has all permissions of their roles - global and local ones.
-* Users of a Group have the group's roles and permissions.

File docs/usage/additional_groups.rst

-=================
-Additional groups
-=================
+=======================================================
+Permission Management with roles and additional groups
+=======================================================
 
 This will demonstrate how one can create special groups (per convention) and
 check permissions against them even if the user has not been assigned to these
 More information
 ----------------
 
-.. seealso::
+.. see also::
 
-    This is just a simple use case. Look into the :doc:`API documentation <../api>` for more.
+    This is just a simple use case. Look into the :doc:`API documentation <../api>` for more.

File docs/usage/index.rst

 .. toctree::
    :maxdepth: 2
    
-   simple.rst
-   additional_groups.rst
+   simple_roles.rst
+   simple_no_roles.rst
+   additional_groups.rst

File permissions/settings.py

 
 OBJECTS_PERM_CHECK=getattr(settings,'PERMISSIONS_OBJECTS_PERM_CHECK',True)
 
-OBJECTS_PERM_CHECK_OVERRIDE=getattr(settings,'PERMISSIONS_OBJECTS_PERM_CHECK_OVERRIDE',True)
+OBJECTS_PERM_CHECK_OVERRIDE=getattr(settings,'PERMISSIONS_OBJECTS_PERM_CHECK_OVERRIDE',False)
 
 OBJECTS_PERM_STRING=getattr(settings,'PERMISSIONS_OBJECTS_PERM_STRING','%s')