Skip to content
Snippets Groups Projects
Commit 0912fc12 authored by Дмитрий Коваленок's avatar Дмитрий Коваленок
Browse files

attached controller OmniauthController

parent 6a028417
No related branches found
No related tags found
No related merge requests found
gem 'omniauth-google'
\ No newline at end of file
GEM
specs:
PLATFORMS
ruby
DEPENDENCIES
require 'account_controller'
class RedmineOmniauthController < ApplicationController
def omniauth_google
AccountController.new.send(:open_id_authenticate, params[:openid_url])
end
end
module RedmineOmniauthHelper
end
<% if Setting.openid? %>
<%= link_to image_tag('/plugin_assets/redmine_omniauth_google/images/google_login_icon.jpg'), omniauth_google_path(openid_url: 'google.com') %>
<% end %>
\ No newline at end of file
<h2>RedmineOmniauthController#omniauth_google</h2>
assets/images/google_login_icon.jpg

2.21 KiB

# Plugin's routes
# See: http://guides.rubyonrails.org/routing.html
get 'omniauth_google', to: 'redmine_omniauth#omniauth_google', as: :omniauth_google
\ No newline at end of file
require 'redmine'
require_dependency 'redmine_omniauth_google/hooks/view_account_login_bottom_hook'
require_dependency 'hooks/view_account_login_bottom_hook'
Redmine::Plugin.register :redmine_omniauth_google do
name 'Redmine Omniauth Google plugin'
......
module Hooks
class ViewAccountLoginBottomHook < Redmine::Hook::ViewListener
def view_account_login_bottom context = {}
context[:controller].send(:render_to_string, {
partial: "hooks/view_account_login_bottom",
locals: context
})
end
end
end
\ No newline at end of file
require File.expand_path('../../test_helper', __FILE__)
class RedmineOmniauthControllerTest < ActionController::TestCase
# Replace this with your real tests.
def test_truth
assert true
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment