Opened 13 years ago

Closed 13 years ago

Last modified 13 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 13 years ago.
patch 2.diff (1.2 KB ) - added by bradley.ayers 13 years ago.
fixed the code-block

Download all attachments as: .zip

Change History (11)

comment:1 by Julien Phalip, 13 years ago

Triage Stage: UnreviewedAccepted

comment:2 by chrisdoble, 13 years ago

UI/UX: unset

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

by chrisdoble, 13 years ago

Attachment: patch.diff added

comment:3 by James Bennett, 13 years ago

Resolution: fixed
Status: newclosed

In [16813]:

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

comment:4 by James Bennett, 13 years ago

In [16814]:

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

by bradley.ayers, 13 years ago

Attachment: patch 2.diff added

fixed the code-block

comment:5 by bradley.ayers, 13 years ago

Resolution: fixed
Status: closedreopened

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

comment:6 by Julien Phalip, 13 years ago

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 by anonymous, 13 years ago

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

comment:8 by Carl Meyer, 13 years ago

Resolution: fixed
Status: reopenedclosed

In [16836]:

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

comment:9 by Carl Meyer, 13 years ago

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