mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 18:36:35 +08:00
FIX: if s3 set via global setting bypass config check in UI
This commit is contained in:
parent
9a813210b9
commit
330e848d4a
|
@ -203,10 +203,13 @@ class AdminDashboardData
|
|||
end
|
||||
|
||||
def s3_config_check
|
||||
# if set via global setting it is validated during the `use_s3?` call
|
||||
if !GlobalSetting.use_s3?
|
||||
bad_keys = (SiteSetting.s3_access_key_id.blank? || SiteSetting.s3_secret_access_key.blank?) && !SiteSetting.s3_use_iam_profile
|
||||
|
||||
return I18n.t('dashboard.s3_config_warning') if SiteSetting.enable_s3_uploads && (bad_keys || SiteSetting.s3_upload_bucket.blank?)
|
||||
return I18n.t('dashboard.s3_backup_config_warning') if SiteSetting.enable_s3_backups && (bad_keys || SiteSetting.s3_backup_bucket.blank?)
|
||||
end
|
||||
nil
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user