Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[Django] #27489: Renaming a model doesn't rename the permission name and codename

31 views
Skip to first unread message

Django

unread,
Nov 15, 2016, 1:31:14 PM11/15/16
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
----------------------------------------+------------------------
Reporter: Tim Graham | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
----------------------------------------+------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/27489>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 9, 2016, 5:54:48 PM12/9/16
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
------------------------------+-----------------------------------------
Reporter: Tim Graham | Owner: Morgan Aubert
Type: Bug | Status: assigned
Component: contrib.auth | Version: 1.10
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------
Changes (by Morgan Aubert):

* status: new => assigned
* owner: nobody => Morgan Aubert


--
Ticket URL: <https://code.djangoproject.com/ticket/27489#comment:1>

Django

unread,
Dec 9, 2016, 6:12:13 PM12/9/16
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
------------------------------+-----------------------------------------
Reporter: Tim Graham | Owner: Morgan Aubert
Type: Bug | Status: assigned
Component: contrib.auth | Version: 1.10
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------

Comment (by Morgan Aubert):

Added [https://github.com/django/django/pull/7673 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/27489#comment:2>

Django

unread,
Dec 9, 2016, 9:09:58 PM12/9/16
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
------------------------------+-----------------------------------------
Reporter: Tim Graham | Owner: Morgan Aubert
Type: Bug | Status: assigned
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------
Changes (by Simon Charette):

* has_patch: 0 => 1
* version: 1.10 => master


--
Ticket URL: <https://code.djangoproject.com/ticket/27489#comment:3>

Django

unread,
Dec 21, 2016, 6:52:46 PM12/21/16
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
------------------------------+-----------------------------------------
Reporter: Tim Graham | Owner: Morgan Aubert
Type: Bug | Status: assigned
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+-----------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1


Comment:

I left comments for improvement on the patch.

--
Ticket URL: <https://code.djangoproject.com/ticket/27489#comment:4>

Django

unread,
Oct 16, 2020, 2:52:52 AM10/16/20
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
------------------------------+------------------------------------
Reporter: Tim Graham | Owner: (none)
Type: Bug | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* owner: Morgan Aubert => (none)
* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/27489#comment:5>

Django

unread,
Aug 3, 2023, 11:03:35 AM8/3/23
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
------------------------------+------------------------------------
Reporter: Tim Graham | Owner: (none)
Type: Bug | Status: new
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by Natalia Bidart):

Duplicates of this are #32715 and #34762.

--
Ticket URL: <https://code.djangoproject.com/ticket/27489#comment:6>

Django

unread,
Apr 20, 2025, 6:38:19 PMApr 20
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
------------------------------+---------------------------------------
Reporter: Tim Graham | Owner: mrartem1927
Type: Bug | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
------------------------------+---------------------------------------
Changes (by mrartem1927):

* owner: (none) => mrartem1927
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/27489#comment:7>

Django

unread,
Apr 21, 2025, 1:43:27 PMApr 21
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
------------------------------+---------------------------------------
Reporter: Tim Graham | Owner: mrartem1927
Type: Bug | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
------------------------------+---------------------------------------
Comment (by mrartem1927):

PR for this [https://github.com/django/django/pull/19405]
--
Ticket URL: <https://code.djangoproject.com/ticket/27489#comment:8>

Django

unread,
May 3, 2025, 6:16:40 AMMay 3
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
------------------------------+---------------------------------------
Reporter: Tim Graham | Owner: mrartem1927
Type: Bug | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+---------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 1 => 0

Comment:

Don't forget to update the ticket's flags so the ticket appears in the
review queue.
--
Ticket URL: <https://code.djangoproject.com/ticket/27489#comment:9>

Django

unread,
May 14, 2025, 10:27:26 AMMay 14
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
------------------------------+---------------------------------------
Reporter: Tim Graham | Owner: mrartem1927
Type: Bug | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+---------------------------------------
Changes (by Sarah Boyce):

* needs_tests: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/27489#comment:10>

Django

unread,
May 26, 2025, 3:54:31 PMMay 26
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
------------------------------+---------------------------------------
Reporter: Tim Graham | Owner: mrartem1927
Type: Bug | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+---------------------------------------
Changes (by mrartem1927):

* needs_tests: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/27489#comment:11>

Django

unread,
Jun 13, 2025, 9:23:44 AM (10 days ago) Jun 13
to django-...@googlegroups.com
#27489: Renaming a model doesn't rename the permission name and codename
------------------------------+---------------------------------------
Reporter: Tim Graham | Owner: mrartem1927
Type: Bug | Status: assigned
Component: contrib.auth | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
------------------------------+---------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/27489#comment:12>
Reply all
Reply to author
Forward
0 new messages