AjobK / Seaqull

Seaqull programming blog
http://www.seaqull.com
4 stars 0 forks source link

397 admin delete comments #398

Open jerohero opened 2 years ago

jerohero commented 2 years ago

closes #397


What is it supposed to do
Allows moderators (or higher) to delete comments owned by other users. A new route is created; "../id/moderator", which checks the sender's permissions.


How can we test your branch
Run npm run reset to get the changes to the permissions. Create a post with a new account without moderator privileges and comment on it. Then log in to the admin account and see if you can delete the comment. Do note that you might need to refresh before being able to see the delete button, since the fix for this is in #396.


1. General checklist


2. If relevant, front-end checklist


3. If relevant, back-end checklist

jerohero commented 2 years ago

Backend tests are failing but this is also happening on develop

AjobK commented 2 years ago

image

When logged in as admin I get the error above when attempting to delete a comment.