django-email-log icon indicating copy to clipboard operation
django-email-log copied to clipboard

Email delete permissions

Open vnagendra opened this issue 11 years ago • 4 comments

Trey, Is there a reason why email delete permissions are returning False for everyone? I can understand if the user is not a superuser..

Before I change that and submit fixes, I want to make sure I won't break any intended functionality..

vnagendra avatar Dec 27 '13 21:12 vnagendra

I set delete permissions in the admin interface to False because deleting a logged email wouldn't actually delete the email itself, it would only delete the recorded history of the email.

I am not opposed to setting this to True by default (probably just for superusers though).

What is your use case?

treyhunner avatar Dec 28 '13 06:12 treyhunner

In my specific scenario, I was using django-email-log for validation of number of emails sent. Example: 10 users added, 10 emails sent. It was just easier for me to look/filter through emails in the admin interface. After the testing was done, I tried to delete emails and that's when I realized it wouldn't let me (I was a superuser for that). I was curious on the reasoning. Unless you tell me otherwise, there isn't one on True shouldn't be the default for superusers :-)

vnagendra avatar Dec 28 '13 12:12 vnagendra

Okay. I'm fine with setting True to delete for superusers. It'd be nice to have a test for that as well so others in your situation won't be disappointed by a regression.

Pull request welcome.

treyhunner avatar Dec 28 '13 21:12 treyhunner

I am not user of this app yet right now we have 4GB of DB size in email logs since like 10 years old, deleting emails for superuser should be OK

robertpro avatar Oct 09 '20 20:10 robertpro