Opened 8 years ago
Last modified 19 months ago
#27489 new Bug
Renaming a model doesn't rename the permission name and codename
Reported by: | Tim Graham | Owned by: | |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | |||
Description ¶
After a RenameModel
operation, new permissions are created with the name and codename of the new model name rather than renaming the permissions with the old model name. It should be feasible to fix by using an approach similar to f179113e6cbc8ba0a8d4e87e1d4410fb61d63e75 where a RenamePermission
operation is injected in the plan after each RenameModel
operation.
#26756 requires the same approach except that the RenamePermission
operation must be inserted after AlterModelOptions
operations with a verbose_name
key.
According to the ticket's flags, the next step(s) to move this issue forward are:
- To improve the patch as described in the pull request review comments or on this ticket, then uncheck "Patch needs improvement".
If creating a new pull request, include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.
Change History (6)
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 8 years ago
comment:3 by , 8 years ago
Has patch: | set |
---|---|
Version: | 1.10 → master |
comment:4 by , 8 years ago
Patch needs improvement: | set |
---|
I left comments for improvement on the patch.
comment:5 by , 4 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
Added PR