#13709: Delete action is visble if no delete permission given [PATCH]
-------------------------------------------+--------------------------------
Reporter: sebastian_noack | Owner: nobody
Status: new | Milestone:
Component: django.contrib.admin | Version: 1.2
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 1 | Needs_tests: 1
Needs_better_patch: 1 |
-------------------------------------------+--------------------------------
Comment (by sebastian_noack):
I don't like the way it is implemented, because of ...
1. it is not consistent. The delete link in the change form is not there
if you don't have the delete permission but the action in the changelist
is there.[[BR]]
2. you should never show functionality if it is not usable. This is just a
waste of pixels (you can save if there weren't action checkboxes, in the
case where no action is usable). And it confuses the user, especially if
you have a lot of custom actions, which probably even are named similar,
makes it harder for the user to choose the right action, if some of them
are actually not permitted to use.
If hanging additional information as attribute at a function is nasty,
what is about the short_description? ;) I have already thought about
alternative implementations, e.g. passing two functions (the view function
and the function checking the permissions) when registering an action. But
this one is the most elegent method I could think about, especially
because of in the admin quite often attributes are attached to callables
for similiar things.
--
Ticket URL: <http://code.djangoproject.com/ticket/13709#comment:2>
Django <http://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.