This PR implements post and comment restrictions disc-wide. If a disc is restricted, only moderators or admins will be able to post/comment. Posts allowed implies comments are allowed. Comments restricted implies posts are restricted.
Use cases:
People keep erroneously posting to /d/Discuit, which is only for admin staff to make announcements; deleting their posts causes butthurt
People want to close down their disc; e.g., merge two similar communities and leave the smaller one inactive
Some developers may want to lock a private testing disc
Dumpster fire is burning in the disc and moderators need to temporarily lock it down
I don't think (?) there is a way to add the two required columns to the communities table automatically and you will have to run a migration manually.
Some edge cases are flaky with error feedback. For example, trying to post via the front-end, but a moderator locks the disc in the interim. In such a case, the front-end helpfully tells me to "Make sure you're connected to the Internet." But this is no worse than what already happens on the live site: similar behaviour occurs with locking a post.
This PR implements post and comment restrictions disc-wide. If a disc is restricted, only moderators or admins will be able to post/comment. Posts allowed implies comments are allowed. Comments restricted implies posts are restricted.
Use cases:
I don't think (?) there is a way to add the two required columns to the communities table automatically and you will have to run a migration manually.
Some edge cases are flaky with error feedback. For example, trying to post via the front-end, but a moderator locks the disc in the interim. In such a case, the front-end helpfully tells me to "Make sure you're connected to the Internet." But this is no worse than what already happens on the live site: similar behaviour occurs with locking a post.