#36793: Reversing RenameModel in an environment with pre-Django 6.0 permission
records leaves wrong users & groups associated
-------------------------------------+-------------------------------------
               Reporter:  Jacob      |          Owner:  Artyom Kotovskiy
  Walls                              |
                   Type:  Bug        |         Status:  assigned
              Component:             |        Version:  6.0
  contrib.auth                       |
               Severity:  Release    |       Keywords:
  blocker                            |
           Triage Stage:             |      Has patch:  1
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  1          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 - 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 `FooModel` and 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.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019b0ed3925f-977cccea-b3e9-4c81-8d70-6d329d8750cf-000000%40eu-central-1.amazonses.com.

Reply via email to