Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'release/0.4.5'

  • Loading branch information...
commit 85647e536ec955f1f9a000f4bacefa1cfb576bd3 2 parents 3a01516 + e3ba238
@lambdalisue authored
Showing with 26 additions and 1 deletion.
  1. +25 −0 README.rst
  2. +1 −1  setup.py
View
25 README.rst
@@ -92,6 +92,31 @@ Quick tutorial
``{% permission %}`` tag is exactuly same as ``{% if %}`` thus you can use
``{% elpermission %}`` for ``{% elif %}`` and ``{% else %}``.
+5. ``permission_required`` decorator is used for object permission checking.
+ You can use the decorator as::
+
+ from permission.decorators import permission_required
+
+ # As class decorator
+ @permission_required('auth.change_user')
+ class UpdateAuthUserView(UpdateView):
+ # ...
+
+ # As method decorator
+ class UpdateAuthUserView(UpdateView):
+ @permission_required('auth.change_user')
+ def dispatch(self, request, *args, **kwargs):
+ # ...
+
+ # As function decorator
+ @permission_required('auth.change_user')
+ def update_auth_user(request, *args, **kwargs):
+ # ...
+
+ see more details in document comments on
+ ``permission/decorators/__init__.py``
+
+
Role?
==========
View
2  setup.py
@@ -1,7 +1,7 @@
# vim: set fileencoding=utf-8 :
from setuptools import setup, find_packages
-version = '0.4.4'
+version = '0.4.5'
def read(filename):
import os.path
Please sign in to comment.
Something went wrong with that request. Please try again.