diff --git a/plugins/oauth_client/db/migrate/20160714113820_create_oauth_client_plugin_config.rb b/plugins/oauth_client/db/migrate/20160714113820_create_oauth_client_plugin_config.rb index 21f94b9..f321a05 100644 --- a/plugins/oauth_client/db/migrate/20160714113820_create_oauth_client_plugin_config.rb +++ b/plugins/oauth_client/db/migrate/20160714113820_create_oauth_client_plugin_config.rb @@ -3,7 +3,7 @@ class CreateOauthClientPluginConfig < ActiveRecord::Migration def change create_table :oauth_client_plugin_configs do |t| t.belongs_to :environment - t.boolean :create_account_for_login, :default => false + t.boolean :allow_external_login, :default => false end end end diff --git a/plugins/oauth_client/models/oauth_client_plugin/config.rb b/plugins/oauth_client/models/oauth_client_plugin/config.rb index 4873b41..cb11742 100644 --- a/plugins/oauth_client/models/oauth_client_plugin/config.rb +++ b/plugins/oauth_client/models/oauth_client_plugin/config.rb @@ -1,7 +1,7 @@ class OauthClientPlugin::Config < ApplicationRecord belongs_to :environment - attr_accessible :create_account_for_login, :environment_id + attr_accessible :allow_external_login, :environment_id class << self def instance diff --git a/plugins/oauth_client/views/auth/_oauth_login.html.erb b/plugins/oauth_client/views/auth/_oauth_login.html.erb index f61038f..931db98 100644 --- a/plugins/oauth_client/views/auth/_oauth_login.html.erb +++ b/plugins/oauth_client/views/auth/_oauth_login.html.erb @@ -5,7 +5,7 @@
<%= _('Only allow login with creation of new account') %> | -<%= check_box_tag "oauth_client_config[create_account_for_login]", true, @config.create_account_for_login %> | + <%= hidden_field_tag "oauth_client_config[allow_external_login]", false %> +<%= _('Allow external login') %> | +<%= check_box_tag "oauth_client_config[allow_external_login]", true, @config.allow_external_login %> |