Opened 17 years ago
Closed 11 years ago
#7599 closed New feature (fixed)
add get_user_permissions method to ModelBackend
| Reported by: | Gary Wilson | Owned by: | jorgecarleitao |
|---|---|---|---|
| Component: | contrib.auth | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | jorgecarleitao | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Makes the code more readable and creates a useful method for subclasses.
Attachments (2)
Change History (20)
by , 17 years ago
| Attachment: | get_user_permissions.patch added |
|---|
comment:1 by , 17 years ago
| Needs documentation: | set |
|---|
comment:2 by , 17 years ago
| milestone: | → post-1.0 |
|---|
comment:3 by , 17 years ago
| Triage Stage: | Unreviewed → Design decision needed |
|---|
comment:4 by , 17 years ago
| milestone: | post-1.0 |
|---|
by , 15 years ago
| Attachment: | get_user_permissions_patch_1.diff added |
|---|
comment:6 by , 15 years ago
| milestone: | → 1.3 |
|---|---|
| Needs documentation: | unset |
| Triage Stage: | Design decision needed → Accepted |
comment:7 by , 15 years ago
| Needs tests: | set |
|---|
comment:9 by , 15 years ago
| Severity: | → Normal |
|---|---|
| Type: | → New feature |
comment:12 by , 12 years ago
| Needs documentation: | set |
|---|
Documentation isn't correct - this isn't a method on the User object, but on rather on ModelBackend which is documented at the bottom of docs/ref/contrib/auth.txt, although none of the methods for the backend are documented so presumably if we documented this one we'd want to document the rest. This ticket also has "needs tests" set, and while I imagine we could test the ability to override the method in a custom backend, I'm not convinced it's necessary as it doesn't look like the rest of the backend is tested in such a way.
comment:13 by , 12 years ago
timo is right. I added a pull request, https://github.com/django/django/pull/2127, that fixes the docs of ModelBackend and apply the patch.
I didn't added a test case because, like timo argued, the backend is not tested anyway. I will fill a ticket reporting this.
comment:14 by , 12 years ago
| Cc: | added |
|---|
comment:15 by , 12 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:16 by , 11 years ago
| Needs documentation: | unset |
|---|---|
| Needs tests: | unset |
| Patch needs improvement: | set |
Please uncheck "Patch needs improvement" when you update the PR, thanks.
comment:17 by , 11 years ago
| Patch needs improvement: | unset |
|---|
comment:18 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Milestone post-1.0 deleted