#11154: Inconsistency with permissions for proxy models
------------------------------+------------------------------------
Reporter: etianen | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by charettes):
* needs_docs: 0 => 1
* needs_tests: 0 => 1
Comment:
Here's the
[https://github.com/charettes/django/compare/master...ticket-11154
-inconsistency-permissions-proxy-models.diff actual approach] I was
talking about at comment:27.
It solves the issue but {{{ proxy_for_model }}} kwarg is really an odd
name, anyone thinking of something better?
It doesn't introduce any backward incompatibly issues since the admin
relied on the {{{ opts }}} of the proxy for the {{{ has_perm }}} checks.
In other words, {{{ ModelAdmin }}} registered with a proxy model couldn't
be accessed at all if you weren't a superuser thus approach such as
[http://www.mahner.org/posts/separating-staff-and-user-accounts-in-
djangos-admin/ this one] wouldn't actually work.
It might also be worth documenting that new kwarg since it can be quite
useful when using the {{{ ContentType }}} framework. The fact that you can
now add permissions for proxy models can be quite handy (see comment:12)
and IMHO is also worth documenting.
All those features need extra testing and doc that I'll be happy providing
if I can get some feedback toward my approach.
--
Ticket URL: <https://code.djangoproject.com/ticket/11154#comment:35>
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.