geeksforsocialchange / imok

A simple bot to support people doing risky activities
https://gfsc.studio/blog/2021/imok-is-launched/
MIT License
12 stars 1 forks source link

chore: restore ability to delete checkins #44

Closed wheresalice closed 3 years ago

wheresalice commented 3 years ago

resolves #34 and resolves #35 by allowing admins to delete a checkin

you can still control which admins have the ability to delete checkins by using Django permissions.

kimadactyl commented 3 years ago

Is there a way to tie them together somehow in a way thats not a giant pain? Or maybe hide one if it autodeletes the other anyway? If not then just merge.

wheresalice commented 3 years ago

it already cascades deletes, which is why you can't delete a member if you don't have permission to delete their checkin

if you try and delete a checked-in member with this PR it will warn you it's going to delete both the member and the checkin.

kimadactyl commented 3 years ago

I guess I'm imagining a state where for whatever reason you've set an admin to delete users and not checkins, and they try and delete someone? If the checkin delete permission is disabled for that person will it raise the error? And if not then theres no point having a box to toggle if people can delete checkins. If that makes sense!

wheresalice commented 3 years ago

if an admin doesn't have permission to delete checkins and they try and delete a member with a checkin then they'll see the error

if an admin does have permission to delete checkins then they will see a confirmation page informing them they are about to delete a member and a checkin