mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 22:26:26 +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
|
end
|
||||||
|
|
||||||
def s3_config_check
|
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
|
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_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?)
|
return I18n.t('dashboard.s3_backup_config_warning') if SiteSetting.enable_s3_backups && (bad_keys || SiteSetting.s3_backup_bucket.blank?)
|
||||||
|
end
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user