Code

Opened 6 months ago

Closed 6 months ago

Last modified 6 months 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)

Attachments (0)

Change History (4)

comment:1 Changed 6 months ago by bmispelon

  • Easy pickings set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Bug

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 Changed 6 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In cc2049cdd7f7afa3ffdccf5ef77af84a9abbf8f9:

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

comment:3 Changed 6 months ago by Tim Graham <timograham@…>

In 4b4b795bd56782ddbbecf427d0ae88b27d896ee8:

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

Backport of cc2049cdd7 from master

comment:4 Changed 6 months ago by Tim Graham <timograham@…>

In 747f77552a08fffe1bb64f862d54cb8ffffb6904:

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

Backport of cc2049cdd7 from master

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.