Closed mxsasha closed 9 years ago
You're right. I haven't hit this problem so far. But, it doesn't make much sense to have the default permissions on the historical objects, at least in most cases. However, I'm thinking that maybe we should leave them off by default, but let the user specify whether to have them on. Either with a settings variable or a parameter passed to the audit log.
I have some reasonably long model names, so I've hit it a few times. In Django 1.8 the permission names can be up to 255 characters if I remember correctly, so that will make it much less likely to run into this.
Adding an optional parameter to the audit log seems like a good solution to me.
OK, so since 0.5.0 it will work without any default permissions for the history models, but only with Django 1.7. In the end I decided not to make this optional, since there's not much point in it. I only added a check to see if the "default_permissions" meta option is available. Thanks for the pull request
As audit log verbose names are long and can't be easily changed, they quickly run into the maximum permission name length. In addition, I don't think it makes sense to create audit log model permissions by default in any case. This patch disables creation.