Unfortunately this was broken release not including any important changes.
get_403_or_None
now accepts Python path to the view function, for example
'django.contrib.auth.views.login'
(Thanks Warren Volz)with_superuser
flag to guardian.shortcuts.get_objects_for_user
(Thanks Bruno Ribeiro da Silva)User
model.
(Thanks Cezar Jenkins)get_for_object
methods from managers (#188)accept_global_perms
to PermissionRequiredMixin
wheel
supportImportant
In this release we have removed undocumented get_for_object
method
from both UserObjectPermissionManager
and
GroupObjectPermissionManager
. Not deprecated, removed. Those methods
were not used within django-guardian
and their odd names could lead to
issues if user would believe they would return object level permissions
associated with user/group and object passed as the input. If you depend
on those methods, you’d need to stick with version 1.1 and make sure you
do not misuse them.
user_can_access_owned_by_group_objects_only
option to
GuardedModelAdmin.
get_perms
shortcut functionGUARDIAN_RENDER_403
and GUARDIAN_RAISE_403
settings (#40)get_obj_perms
(#43)permission_required
docstring (#49)accept_global_perms
for decorators (#49)get_objects_for_user
and
get_objects_for_group
(#65)get_objects_for_group
shortcut (thanks to Rafael Ponieman)user_can_access_owned_objects_only
flag to GuardedModelAdmin
get_users_with_perms
now accepts with_group_users
flaggroup_id
issue at admin templatesget_users_with_perms
now accepts with_superusers
flagget_objects_for_user
shortcut functiondjango.contrib.auth
testsclean_orphan_obj_perms
management commandremove_perm
shortcut functionsMANIFEST.in
guardian.shortcuts.get_users_with_perms
functionAUTHORS
file#4: guardian now supports models with not-integer primary keys and they don’t need to be called “id”.
Important
For 0.1.X users: it is required to migrate guardian in your projects.
Add south
to INSTALLED_APPS
and run:
python manage.py syncdb
python manage.py migrate guardian 0001 --fake
python manage.py migrate guardian
permission_required
and
permission_required_403