Don't show the link to "Needs Approval" unless approval is enabled.

Note that any plugin that extends the NewPostMananger to support
enqueuing will enable it.
This commit is contained in:
Robin Ward
2015-04-21 13:59:57 -04:00
parent dd3953bf19
commit 26693c16ac
4 changed files with 27 additions and 3 deletions

View File

@ -26,6 +26,12 @@ class NewPostManager
end
end
def self.queue_enabled?
SiteSetting.approve_post_count > 0 ||
SiteSetting.approve_unless_trust_level.to_i > 0 ||
handlers.size > 1
end
add_handler {|manager| default_handler(manager) }
def initialize(user, args)