Opened 6 years ago

Closed 6 years ago

Last modified 5 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 Brett Haydon 6 years ago.
ticket14795test.diff (1.1 KB) - added by Brett Haydon 6 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 6 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 6 years ago by Brett Haydon

Keywords: sprintdec2010 added
Needs documentation: set
Needs tests: set
Owner: changed from nobody to anonymous
Patch needs improvement: set
Status: newassigned
Triage Stage: UnreviewedAccepted

Changed 6 years ago by Brett Haydon

Attachment: ticket14795patch.diff added

comment:3 Changed 6 years ago by Brett Haydon

Has patch: set
Needs documentation: unset

Changed 6 years ago by Brett Haydon

Attachment: ticket14795test.diff added

comment:4 Changed 6 years ago by Brett Haydon

milestone: 1.3
Needs tests: unset
Patch needs improvement: unset
Version: 1.3-alphaSVN

comment:5 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: assignedclosed

(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 6 years ago by Russell Keith-Magee

(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 6 years ago by jayhalleaux <jay.halleaux@…>

Triage Stage: AcceptedReady for checkin

comment:8 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

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