Block Comments for Users with Roles of Sussy
complete
Amrayu78
complete
Max Romanchenko
Done. We already have code that hides the comment field for unregistered users.
I have slightly adapted this code (in dramaotaku-plugin.php file) to hide the comment field for users with the Sussy role as well.
I can’t say whether this code works in practice (I don’t have the login details for a user with this role), so please check it out.
Amrayu78
Max Romanchenko: Hi Max, This isn't working as expected.
I'll explain the use case.
- A Sussy user can log into the site as usual.
- They shouldn't be able to post any comments; so block off commenting.
- They can view other comments, but they can't reply.
catstreet tested this and here's what she saw:
- Logged in with test account that's assigned "Sussy" role
- She can still see the comment fields
- She can still post a comment
- Although she can post a comment, she doesn't see her comment after submitting
Max Romanchenko
Amrayu78: Thanks for the information. Sorry, I needed to test the functionality before claiming it was done.
I have changed the code and created a test user with the Sussy role. Now everything should work as you described.
Please check again.
Amrayu78
Max Romanchenko: Thanks Max! I've assigned to cat to test for now. She will report the results when she's done.
C
Cat
Max Romanchenko Hi, can confirm the comments are seemingly now blocked from being posted for Sussy role users!
I can also confirm that the Sussy role can view the comments that have been posted but can't reply. So everything is working as expected! thank you :)
Max Romanchenko
Cat: Hi,
Thanks for checking everything.
Glad to help you!