#16862: I'm try to implement object permission on django admin.
------------------------+-------------------------------
Reporter: Kidwind | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: contrib.admin
Version: SVN | Severity: Normal
Keywords: permission | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------+-------------------------------
i'm override ModelAdmin for my object permission Backend like this
def has_delete_permission(self, request, obj=None):
opts = self.opts
return request.user.has_perm(opts.app_label + '.' +
opts.get_delete_permission(), obj) # pass parm obj
but when i delete the obj,System back to me "Deleting the article 'test'
would result in deleting related objects, but your account doesn't have
permission to delete the following types of objects:article".
why? i try to find the Root of the problem.
in the django.contrib.admin.utils.get_deleted_objects not pass parm "obj"
to detect the permission for related deleted obj.
Django did not provide extension points,I can only change the django
source code.
when i try to implement object permission for django admin,What is the
best solution,thank you.
--
Ticket URL: <https://code.djangoproject.com/ticket/16862>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.