Opened 39 minutes ago
Last modified 33 minutes ago
#36793 assigned Bug
Reverting a model rename in an environment with pre-Django 6.0 permission records leaves wrong users & groups associated
| Reported by: | Jacob Walls | Owned by: | Artyom Kotovskiy |
|---|---|---|---|
| Component: | contrib.auth | Version: | 6.0 |
| Severity: | Release blocker | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | yes |
| Easy pickings: | no | UI/UX: | no |
Description
- Checkout Django 5.2
- Assign user 1 to have view permissions on
FooModel - Rename the model to
BarModel - Migrate
(Result: no permissions transfer to BarModel, FooModel permissions left behind in the db).
- Assign user 2 to have view permissions on
BarModel - Checkout Django 6.0
- Rename the model back to
FooModeland migrate forward
Expected: ?
What user should have view permissions on FooModel now, 1 or 2?
As of #27489, which makes the permissions tag along with RenameModel operations, I think we would expect user 2. (Proposed fix PR makes it Users 1 *and* 2, but I'm interested to hear more on that.)
Actual result: User 1 has the permission on FooModel, and BarModel permissions for User 2 are left behind in the db.
Change History (2)
comment:1 by , 39 minutes ago
comment:2 by , 33 minutes ago
| Summary: | Reversing RenameModel in an environment with pre-Django 6.0 permission records leaves wrong users & groups associated → Reverting a model rename in an environment with pre-Django 6.0 permission records leaves wrong users & groups associated |
|---|
PR