Why are the has add/delete/change permissions set to False in the BaseEventAdmin? #194
-
In admin/core.py BaseEventAdmin, the permissions are all hardcoded to django-pghistory/pghistory/admin/core.py Lines 159 to 166 in e991e61 May I know what is the reasoning behind it? Should we not add/delete the models through the Admin anymore? If we override this behavior, returning Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I believe the main reason I did this was to discourage manually editing event models. However, since the introduction of the APPEND_ONLY setting, this allows users to protect their event models from ever being manually edited. I could see us turning on/off admin functionality based on this setting. In other words, if append-only is enabled, we don't allow delete/change. I'm not sure where I stand on if the "add_permission" should be enabled though. Some people don't ever want to allow manually adding events outside of what changes in the DB. I assume you desire the ability to manually add/remove/change events? |
Beta Was this translation helpful? Give feedback.
I believe the main reason I did this was to discourage manually editing event models.
However, since the introduction of the APPEND_ONLY setting, this allows users to protect their event models from ever being manually edited.
I could see us turning on/off admin functionality based on this setting. In other words, if append-only is enabled, we don't allow delete/change. I'm not sure where I stand on if the "add_permission" should be enabled though. Some people don't ever want to allow manually adding events outside of what changes in the DB.
I assume you desire the ability to manually add/remove/change events?