If i'm creating two models, and inheriting the meta class on both, a can_undelete permission will be created for each of them.
class ModelA(SoftDeleteObject, models.Model):
class Meta(SoftDeleteObject.Meta):
verbose_name = "Model A"
some_field = models.CharField()
class ModelB(SoftDeleteObject, models.Model):
class Meta(SoftDeleteObject.Meta):
verbose_name = "Model A"
some_field = models.CharField()
If i then assign the can_undelete permission for ModelA to user1, and assign can_delete for ModelB to user2, both users will be able to undelete ModelA and ModelB objects, because the permission's codename is not unique.
If i'm creating two models, and inheriting the meta class on both, a
can_undeletepermission will be created for each of them.If i then assign the
can_undeletepermission forModelAtouser1, and assigncan_deleteforModelBtouser2, both users will be able to undeleteModelAandModelBobjects, because the permission'scodenameis not unique.