Allow user staging via setting (#5468)

This commit is contained in:
Yaw Anokwa 2018-01-04 03:17:35 -05:00 committed by Régis Hanol
parent a109397035
commit 77a92e8878
3 changed files with 4 additions and 1 deletions

View File

@ -64,7 +64,7 @@ module ImportScripts::Mbox
email: row['email'],
name: row['name'],
trust_level: @settings.trust_level,
staged: true,
staged: @settings.staged,
active: false,
created_at: to_time(row['date_of_first_message'])
}

View File

@ -8,3 +8,4 @@ split_regex: ""
default_trust_level: 1
prefer_html: false
staged: true

View File

@ -12,6 +12,7 @@ module ImportScripts::Mbox
attr_reader :batch_size
attr_reader :trust_level
attr_reader :prefer_html
attr_reader :staged
def initialize(yaml)
@data_dir = yaml['data_dir']
@ -19,6 +20,7 @@ module ImportScripts::Mbox
@batch_size = 1000 # no need to make this actually configurable at the moment
@trust_level = yaml['default_trust_level']
@prefer_html = yaml['prefer_html']
@staged = yaml['staged']
end
end
end