Code

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#14795 closed (fixed)

Empty Superuser Permissions

Reported by: jay.halleaux@… Owned by: anonymous
Component: contrib.auth Version: master
Severity: Keywords: sprintdec2010, superuser, permissions
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The following:

user.get_all_permissions()

Returns an empty set for a superuser without any explicitly stated permissions.

Based on the definition on the admin page, a superuser has all permissions, implicitly.

Adding an explicit permission however does show up.

Thanks.

Attachments (2)

ticket14795patch.diff (902 bytes) - added by bretth 3 years ago.
ticket14795test.diff (1.1 KB) - added by bretth 3 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 3 years ago by jayhalleaux <jay.halleaux@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

However

user.has_perm('some permission')

works despite the set not populating.

comment:2 Changed 3 years ago by bretth

  • Keywords sprintdec2010, added
  • Needs documentation set
  • Needs tests set
  • Owner changed from nobody to anonymous
  • Patch needs improvement set
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

Changed 3 years ago by bretth

comment:3 Changed 3 years ago by bretth

  • Has patch set
  • Needs documentation unset

Changed 3 years ago by bretth

comment:4 Changed 3 years ago by bretth

  • milestone set to 1.3
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from 1.3-alpha to SVN

comment:5 Changed 3 years ago by russellm

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

(In [14797]) Fixed #14795 -- Ensure that get_all_permissions() returns the right result (i.e., all permissions) for superusers. Thanks to jay.halleaux@… for the report, and Brett Haydon for the patch.

comment:6 Changed 3 years ago by russellm

(In [14801]) [1.2.X] Fixed #14795 -- Ensure that get_all_permissions() returns the right result (i.e., all permissions) for superusers. Thanks to jay.halleaux@… for the report, and Brett Haydon for the patch.

Backport of r14797 from trunk.

comment:7 Changed 3 years ago by jayhalleaux <jay.halleaux@…>

  • Triage Stage changed from Accepted to Ready for checkin

comment:8 Changed 3 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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.