-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
31 lines (23 loc) · 821 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
28
29
30
31
require 'redmine'
# Patches to the Redmine core.
require 'dispatcher'
require 'issue_patch'
require 'query_patch'
Dispatcher.to_prepare do
Issue.send(:include, RedmineIssueFlag::IssuePatch)
Query.send(:include, RedmineIssueFlag::QueryPatch)
end
require_dependency 'issue_flag_hook'
Redmine::Plugin.register :redmine_issue_flag do
name 'Redmine Issue Flag plugin'
author 'hysios hu'
description 'This is a plugin for Redmine'
version '0.0.1'
url 'http://example.com/path/to/plugin'
author_url 'http://example.com/about'
project_module :issue_flag do
permission :issue_flag, { :issue_flag => [:index] }
permission :award_flag, { }, :require => :admin
end
menu :project_menu, :issue_flag, { :controller => 'issue_flag', :action => 'index' }, :caption => :issue_flag
end