Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force Moderation on All Posts #661

Closed
vkoves opened this issue May 21, 2015 · 4 comments
Closed

Force Moderation on All Posts #661

vkoves opened this issue May 21, 2015 · 4 comments

Comments

@vkoves
Copy link

vkoves commented May 21, 2015

Is there a way that I can force moderation for all posts, and disable the spam/approval process? I would like all posts to have to be approved by a moderator, and then user can individually be "approved" and "blacklisted" instead of it being done automatically. I tried some overrides to accomplish this, but that has not worked so far.

Any suggestions, or is it possible this will be added in the future?

@radar
Copy link
Collaborator

radar commented May 24, 2015

Forem.moderate_first_post = false in config/initializers/forem.rb.

@radar radar closed this as completed May 24, 2015
@vkoves
Copy link
Author

vkoves commented Jun 4, 2015

This doesn't work. After testing, it just disables all moderation, which is the opposite of what I want. This is also what you said here when someone was trying to prevent moderation.

So is there any way I can prevent users from being "approved" and force every single post to be moderated?

@vkoves
Copy link
Author

vkoves commented Jun 4, 2015

After digging through the code, this override let me do it:

 # We don't want forem auto moderating stuff, so let's do this
  Forem::Post.class_eval do
    def skip_pending_review
        approve! unless user && true #user.forem_moderate_posts?
    end
  end

Is there an official way that I am missing (didn't see one in the documentation)?

Thanks again, forem's been a real treat.

@radar
Copy link
Collaborator

radar commented Jun 5, 2015

Ah, I understand now. Yes you can override it like that to accomplish what you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants