Code

Opened 3 years ago

Closed 3 years ago

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

Download all attachments as: .zip

Change History (11)

comment:1 Changed 3 years ago by julien

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by chrisdoble

  • UI/UX unset

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

Changed 3 years ago by chrisdoble

comment:3 Changed 3 years ago by ubernostrum

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

In [16813]:

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

comment:4 Changed 3 years ago by ubernostrum

In [16814]:

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

Changed 3 years ago by bradley.ayers

fixed the code-block

comment:5 Changed 3 years ago by bradley.ayers

  • Resolution fixed deleted
  • Status changed from closed to reopened

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

comment:6 Changed 3 years ago by julien

  • Triage Stage changed from Accepted to Ready 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 3 years ago by anonymous

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

comment:8 Changed 3 years ago by carljm

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

In [16836]:

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

comment:9 Changed 3 years ago by carljm

In [16837]:

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

Backport of r16836 from trunk.

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.