To figure this out, the user has to look up the source code for
permission_required, see that it calls has_perms(), and then look up the
docs for has_perms to see that it requires ALL the listed permissions to
be held. Sad trombone.
https://docs.djangoproject.com/en/1.8/topics/auth/default/#the-permission-
required-decorator
--
Ticket URL: <https://code.djangoproject.com/ticket/25229>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "25229.diff" added.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
Comment:
Does the attached patch look sufficient?
--
Ticket URL: <https://code.djangoproject.com/ticket/25229#comment:1>
Comment (by direvus):
Replying to [comment:1 timgraham]:
> Does the attached patch look sufficient?
Yes, that looks great, thanks Tim!
--
Ticket URL: <https://code.djangoproject.com/ticket/25229#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"16a8d01308f8ca4a7b4673424059424ba3fe36c8" 16a8d01]:
{{{
#!CommitTicketReference repository=""
revision="16a8d01308f8ca4a7b4673424059424ba3fe36c8"
Fixed #25229 -- Clarified how an iterable works with @permission_required
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25229#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"a7fb311aced5469dbf2588d860579be87b67e3d9" a7fb311]:
{{{
#!CommitTicketReference repository=""
revision="a7fb311aced5469dbf2588d860579be87b67e3d9"
[1.8.x] Fixed #25229 -- Clarified how an iterable works with
@permission_required
Backport of 16a8d01308f8ca4a7b4673424059424ba3fe36c8 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25229#comment:4>