Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#16094 closed Cleanup/optimization (fixed)

Documentation for Custom permissions is ambiguous.

Reported by: Bradley Ayers <bradley.ayers@…> Owned by: nobody
Component: Documentation Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The example in http://docs.djangoproject.com/en/1.3/topics/auth/#custom-permissions is not clear. A few extra permissions are defined, e.g. "can_view", but it wasn't clear to me whether this would result in an "app.can_view" or "app.can_view_task" permission. Essentially in order to figure out what would happen, I had to create a test permission and run syncdb.

Attachments (2)

patch.diff (1.2 KB) - added by chrisdoble 5 years ago.
patch 2.diff (1.2 KB) - added by bradley.ayers 5 years ago.
fixed the code-block

Download all attachments as: .zip

Change History (11)

comment:1 Changed 6 years ago by Julien Phalip

Triage Stage: UnreviewedAccepted

comment:2 Changed 5 years ago by chrisdoble

UI/UX: unset

I've attached a patch that will hopefully make things clearer.

Changed 5 years ago by chrisdoble

Attachment: patch.diff added

comment:3 Changed 5 years ago by James Bennett

Resolution: fixed
Status: newclosed

In [16813]:

Fixed #16094: Added clear example of how to refer to custom permissions.

comment:4 Changed 5 years ago by James Bennett

In [16814]:

[1.3.X] Fixed #16094: Added clear example of how to refer to custom permissions. Backport of [16813] from trunk.

Changed 5 years ago by bradley.ayers

Attachment: patch 2.diff added

fixed the code-block

comment:5 Changed 5 years ago by bradley.ayers

Resolution: fixed
Status: closedreopened

There was a missing colon in the original patch. I've corrected this attached the patch.

comment:6 Changed 5 years ago by Julien Phalip

Triage Stage: AcceptedReady for checkin

Thanks for pointing this out, but it'd have been more useful if the patch was based on the latest trunk :)

The missing colon is at the end of the sentence "Continuing the above example, the following checks if a user may". This might have to be backported to 1.3.X to fix r16814.

comment:7 Changed 5 years ago by anonymous

Oops! Good point julien, I didn't think that through too well :/

comment:8 Changed 5 years ago by Carl Meyer

Resolution: fixed
Status: reopenedclosed

In [16836]:

Fixed #16094 -- Added missing colon in custom permissions docs.

comment:9 Changed 5 years ago by Carl Meyer

In [16837]:

[1.3.X] Fixed #16094 -- Added missing colon in custom permissions docs.

Backport of r16836 from trunk.

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