Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#14795 closed (fixed)

Empty Superuser Permissions

Reported by: jay.halleaux@… Owned by: anonymous
Component: contrib.auth Version: dev
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: no UI/UX: no

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

Download all attachments as: .zip

Change History (10)

comment:1 by jayhalleaux <jay.halleaux@…>, 14 years ago

However

user.has_perm('some permission')

works despite the set not populating.

comment:2 by Brett Haydon, 14 years ago

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

by Brett Haydon, 14 years ago

Attachment: ticket14795patch.diff added

comment:3 by Brett Haydon, 14 years ago

Has patch: set
Needs documentation: unset

by Brett Haydon, 14 years ago

Attachment: ticket14795test.diff added

comment:4 by Brett Haydon, 14 years ago

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

comment:5 by Russell Keith-Magee, 14 years ago

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 by Russell Keith-Magee, 14 years ago

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

Triage Stage: AcceptedReady for checkin

comment:8 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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