diff --git a/plugins/oauth_client/controllers/oauth_client_plugin_admin_controller.rb b/plugins/oauth_client/controllers/oauth_client_plugin_admin_controller.rb index 3e4e370..10b4332 100644 --- a/plugins/oauth_client/controllers/oauth_client_plugin_admin_controller.rb +++ b/plugins/oauth_client/controllers/oauth_client_plugin_admin_controller.rb @@ -24,4 +24,8 @@ class OauthClientPluginAdminController < AdminController end end + def edit_login_option + option = params['oauth_client_plugin_option'] + end + end 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 new file mode 100644 index 0000000..21f94b9 --- /dev/null +++ b/plugins/oauth_client/db/migrate/20160714113820_create_oauth_client_plugin_config.rb @@ -0,0 +1,9 @@ +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 + 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 new file mode 100644 index 0000000..5447329 --- /dev/null +++ b/plugins/oauth_client/models/oauth_client_plugin/config.rb @@ -0,0 +1,7 @@ +class OauthClientPlugin::Config < ApplicationRecord + + belongs_to :environment + + attr_accessible :create_account_for_login + +end 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 98b3ce1..57188e6 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 @@ -1,4 +1,22 @@

<%= _('Oauth Client Settings') %>

+ +<%= labelled_form_for("") do |f| %> + + + <%= hidden_field_tag('environment[enabled_features][]', '') %> + + + +
<%= _('Only allow login with creation of new account') %><%= check_box_tag "environment[enabled_features][]","" ,"" %>
+ +
+ <%= button_bar do %> + <%= submit_button('save', _('Save changes')) %> + <%= button :back, _('Back to plugins panel'), :controller => 'plugins', :action => 'index' %> + <% end %> +
+<% end %> +

<%= _('Providers') %>

<%= button :add, _('New'), {:action => 'new'} %> -- libgit2 0.21.2