forked from applewu/redmine_omniauth_gitlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.rb
More file actions
25 lines (22 loc) · 885 Bytes
/
init.rb
File metadata and controls
25 lines (22 loc) · 885 Bytes
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
require 'redmine'
require_dependency 'redmine_omniauth_gitlab/hooks'
Redmine::Plugin.register :redmine_omniauth_gitlab do
name 'Redmine Omniauth Gitlab Plugin'
author 'zhangqiuyun@infohold.com.cn'
description 'This is a plugin for Redmine registration through gitlab'
version '0.0.2'
url 'https://github.com/qbcbyb/redmine_omniauth_gitlab'
author_url 'https://github.com/qbcbyb'
settings :default => {
:site => "",
:client_id => "",
:client_secret => "",
:oauth_authentification => false,
:allowed_domains => "",
:register_enable => false
}, :partial => 'settings/gitlab_settings'
Redmine::MenuManager.map :account_menu do |menu|
menu.delete :register
menu.push :register, :register_path, :if => Proc.new { !User.current.logged? && Setting.self_registration? && Setting.plugin_redmine_omniauth_gitlab['register_enable'] }
end
end