forked from ninech/redmine_cas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
27 lines (24 loc) · 879 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'redmine'
require 'redmine_cas'
require 'redmine_cas/application_controller_patch'
require 'redmine_cas/account_controller_patch'
Redmine::Plugin.register :redmine_cas do
name 'Redmine CAS'
author 'Nils Caspar (Nine Internet Solutions AG)'
description 'Plugin to CASify your Redmine installation.'
version '1.0.1'
url 'https://github.com/ninech/redmine_cas'
author_url 'http://www.nine.ch/'
settings :default => {
'enabled' => false,
'cas_url' => 'https://',
'attributes_mapping' => 'firstname=first_name&lastname=last_name&mail=email'
}, :partial => 'redmine_cas/settings'
Rails.configuration.to_prepare do
ApplicationController.send(:include, RedmineCAS::ApplicationControllerPatch)
AccountController.send(:include, RedmineCAS::AccountControllerPatch)
end
ActionDispatch::Callbacks.before do
RedmineCAS.setup!
end
end