Code

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#13503 closed (fixed)

Documentation for "Custom permissions" is misleading

Reported by: dmoisset Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The documentation at http://docs.djangoproject.com/en/dev/topics/auth/#id2 gives an example of custom permissions. It Creates a "USCitizen" model, and custom permissions "can drive", "can vote", etc. These makes it look like the permissions system allows you to describe actions performed by models; when actually the permission system allows you to describe actions performed by *users* (django.contrib.auth.models.User) over other models.

A more realistic (and useful) example, would be something on the lines of a model "Article" with permissions "can publish" and "can edit title", for example

Attachments (0)

Change History (3)

comment:1 Changed 4 years ago by russellm

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

comment:2 Changed 4 years ago by ramiro

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

(In [14403]) Fixed #13503 -- Corrected misleading custom permission example in the docs.

Thanks Daniel Moisset for the report.

comment:3 Changed 4 years ago by ramiro

(In [14404]) [1.2.X] Fixed #13503 -- Corrected misleading custom permission example in the docs.

Thanks Daniel Moisset for the report.

Backport of [14403] 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.