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 @@
<%= render :partial => 'auth/generate_providers_links', :locals => {:providers => providers, :action => ""} %>
- <% if OauthClientPlugin::Config.instance.create_account_for_login %> + <% if OauthClientPlugin::Config.instance.allow_external_login %> <%= _('Login with:') %>
<%= render :partial => 'auth/generate_providers_links', :locals => {:providers => providers, :action => "external_login"} %> diff --git a/plugins/oauth_client/views/oauth_client_plugin_admin/index.html.erb b/plugins/oauth_client/views/oauth_client_plugin_admin/index.html.erb index f0ac216..98d69a9 100644 --- a/plugins/oauth_client/views/oauth_client_plugin_admin/index.html.erb +++ b/plugins/oauth_client/views/oauth_client_plugin_admin/index.html.erb @@ -3,9 +3,9 @@ <%= labelled_form_for @config, url: { action: "update_configs" } do |f| %> - <%= hidden_field_tag "oauth_client_config[create_account_for_login]", false %> - - + <%= hidden_field_tag "oauth_client_config[allow_external_login]", false %> + +
<%= _('Only allow login with creation of new account') %><%= check_box_tag "oauth_client_config[create_account_for_login]", true, @config.create_account_for_login %><%= _('Allow external login') %><%= check_box_tag "oauth_client_config[allow_external_login]", true, @config.allow_external_login %>
-- libgit2 0.21.2