Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#21325 closed Bug (fixed)

permission_required documentation is missing required arguement

Reported by: anonymous Owned by: nobody
Component: Documentation Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Currently, the permission_required decorator (https://docs.djangoproject.com/en/1.5/topics/auth/default/#django.contrib.auth.decorators.permission_required) does not show the correct number of arguments in the documentation. It is missing the 'perm' required argument. However, the description does mention the require argument.

Documentation: permission_required([login_url=None, raise_exception=False])
Source Code: permission_required(perm, login_url=None, raise_exception=False)

Change History (4)

comment:1 by Baptiste Mispelon, 11 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

Indeed, the first argument is missing from the signature.

Note that first argument is a permission's name or - in the newest version of django (1.7) - a list of permissions.

comment:2 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In cc2049cdd7f7afa3ffdccf5ef77af84a9abbf8f9:

Fixed #21325 -- Added missing argument to permission_required decorator.

comment:3 by Tim Graham <timograham@…>, 11 years ago

In 4b4b795bd56782ddbbecf427d0ae88b27d896ee8:

[1.5.x] Fixed #21325 -- Added missing argument to permission_required decorator.

Backport of cc2049cdd7 from master

comment:4 by Tim Graham <timograham@…>, 11 years ago

In 747f77552a08fffe1bb64f862d54cb8ffffb6904:

[1.6.x] Fixed #21325 -- Added missing argument to permission_required decorator.

Backport of cc2049cdd7 from master

Note: See TracTickets for help on using tickets.
Back to Top