mirror of
https://github.com/jazzband/django-authority.git
synced 2026-03-16 22:20:28 +00:00
Automated merge with http://bitbucket.org/barttc/django-authority/
--HG-- files : src/authority/views.py
This commit is contained in:
commit
1f89e24995
3 changed files with 6 additions and 2 deletions
3
AUTHORS
3
AUTHORS
|
|
@ -1 +1,2 @@
|
|||
Jannis Leidel
|
||||
Jannis Leidel <jannis@leidel.info>
|
||||
Martin Mahner <martin@mahner.org>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
include AUTHORS
|
||||
include LICENSE
|
||||
include buildout.cfg
|
||||
include buildout.py
|
||||
recursive-include src/authority/templates/authority *
|
||||
recursive-include src/authority/templates/admin *
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ def add_permission(request, app_label, module_name, pk, extra_context={},
|
|||
return HttpResponseForbidden(next)
|
||||
model = get_model(app_label, module_name)
|
||||
if model is None:
|
||||
return HttpResponseRedirect(next)
|
||||
return permission_denied(request)
|
||||
obj = get_object_or_404(model, pk=pk)
|
||||
form = UserPermissionForm(data=request.POST, obj=obj,
|
||||
perm=codename, initial={'codename': codename})
|
||||
|
|
|
|||
Loading…
Reference in a new issue