Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14764 closed (fixed)

Docs and code disagree on return type of Users.get_all_permissions()

Reported by: MostAwesomeDude Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: UI/UX:

Description

While implementing an authentication backend, I noticed that the documentation for get_all_permissions() (http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.models.User.get_all_permissions) claims "Return a list", but the backend wrapper in django/contrib/auth/models.py:149, _user_get_all_permissions(), creates and returns a set instead of a list. This causes one of our internal unit tests to fail.

A set makes good sense here, but the documentation and code are in conflict with each other. Could I get a resolution?

(Patch not attached since I have no preference as to the actual fix.)

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by DrMeers

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

(In [14787]) Fixed #14764 -- specified that a set is returned by User.get_..._permissions methods. Thanks MostAwesomeDude for the report.

comment:2 Changed 3 years ago by DrMeers

(In [14788]) [1.2.X] Fixed #14764 -- specified that a set is returned by User.get_..._permissions methods. Thanks MostAwesomeDude for the report.

Backport of r14787 from trunk.

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.