mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: don't enable new google auth setting on an existing site
This commit is contained in:
parent
c913c50c68
commit
77845ec114
1 changed files with 6 additions and 0 deletions
|
@ -8,6 +8,12 @@ class GoogleOpenidDefaultHasChanged < ActiveRecord::Migration
|
|||
# The old default was true, so add a row to keep it that way.
|
||||
execute "INSERT INTO site_settings (name, data_type, value, created_at, updated_at) VALUES ('enable_google_logins', 5, 't', now(), now())"
|
||||
end
|
||||
|
||||
# Don't enable the new Google setting on an existing site.
|
||||
result = User.exec_sql("SELECT count(*) FROM site_settings WHERE name = 'enable_google_oauth2_logins'")
|
||||
if result[0]['count'].to_i == 0
|
||||
execute "INSERT INTO site_settings (name, data_type, value, created_at, updated_at) VALUES ('enable_google_oauth2_logins', 5, 'f', now(), now())"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue