#15915: Permission codename duplication is not handled well
--------------------------------------+------------------------------
Reporter: valyagolev | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: contrib.auth
Version: 1.3 | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
--------------------------------------+------------------------------
Comment (by carljm):
Replying to [comment:3 valyagolev]:
> But if you add two permissions with same codename and description,
everything will be fine thanks to set(). Isn't inconsistent a little bit?
Yes - sorry, didn't catch that subtlety. It is a little inconsistent, and
we could start raising errors in that case -- but I'm not sure it's
actually worth doing so. It could break some people's currently-working
code, and for what benefit? If two permissions are defined with exactly
the same info, creating a single permission with that info seems like a
choice that's never wrong. (I also wonder, without having looked into it,
if there are cases with model inheritance where this situation might crop
up unintentionally?)
So while I don't have strong feelings, my leaning is that we may as well
restrict ourselves to just making the error nicer when there are two
permissions defined with the same codename and different descriptions.
--
Ticket URL: <http://code.djangoproject.com/ticket/15915#comment:4>
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.