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
[x] a. Tested happy flow.
[x] b. Tested unhappy flow.
[x] c. No unexpected exceptions.
[x] d. No code with high complexity. (Big O)
[x] e. EOF newline.
[x] f. No linter warnings or errors.
2. If relevant, front-end checklist
[x] a. Responsive. (Desktop all the way to mobile 320px)
[x] b. Using SCSS variables where relevant.
[x] c. Relevant class names
[x] d. No modified global SCSS properties, except if necessary and fully tested the impact.
[x] e. Checked caniuse for more modern CSS properties.
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