mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 14:38:17 +08:00
add "Approve new topics unless user level" setting
This commit is contained in:
parent
53e309fe3e
commit
5dbb3035d4
|
@ -1353,6 +1353,7 @@ en:
|
|||
|
||||
approve_post_count: "The amount of posts from a new or basic user that must be approved"
|
||||
approve_unless_trust_level: "Posts for users below this trust level must be approved"
|
||||
approve_new_topics_unless_trust_level: "New topics for users below this trust level must be approved"
|
||||
notify_about_queued_posts_after: "If there are posts that have been waiting to be reviewed for more than this many hours, an email will be sent to the contact_email. Set to 0 to disable these emails."
|
||||
auto_close_messages_post_count: "Maximum number of posts allowed in a message before it is automatically closed (0 to disable)"
|
||||
auto_close_topics_post_count: "Maximum number of posts allowed in a topic before it is automatically closed (0 to disable)"
|
||||
|
|
|
@ -544,6 +544,9 @@ posting:
|
|||
approve_unless_trust_level:
|
||||
default: 0
|
||||
enum: 'TrustLevelSetting'
|
||||
approve_new_topics_unless_trust_level:
|
||||
default: 0
|
||||
enum: 'TrustLevelSetting'
|
||||
notify_about_queued_posts_after:
|
||||
default: 24
|
||||
min: 0
|
||||
|
|
|
@ -73,6 +73,7 @@ class NewPostManager
|
|||
|
||||
(user.trust_level <= TrustLevel.levels[:basic] && user.post_count < SiteSetting.approve_post_count) ||
|
||||
(user.trust_level < SiteSetting.approve_unless_trust_level.to_i) ||
|
||||
(manager.args[:title].present? && user.trust_level < SiteSetting.approve_new_topics_unless_trust_level.to_i) ||
|
||||
is_fast_typer?(manager) ||
|
||||
matches_auto_block_regex?(manager)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user