discuitnet / discuit

A free and open-source community discussion platform.
https://discuit.net
GNU Affero General Public License v3.0
426 stars 51 forks source link

Enhancement: Disc post/comment permissions #95

Closed reallytiredofclowns closed 2 weeks ago

reallytiredofclowns commented 6 months ago

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.

reallytiredofclowns commented 2 weeks ago

More or less implemented by 19ccd04.