-
Notifications
You must be signed in to change notification settings - Fork 14
/
init.rb
32 lines (24 loc) · 1.3 KB
/
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
32
require 'redmine'
RISKS_VERSION_NUMBER = '1.8.0'
Redmine::Plugin.register :redmine_risks do
name 'Risks'
author 'eXolnet'
description 'Manage the results of the qualitative risk analysis, quantitative risk analysis, and risk response planning.'
version RISKS_VERSION_NUMBER
url 'https://github.com/eXolnet/redmine_risks'
author_url 'https://www.exolnet.com'
requires_redmine :version_or_higher => '5.0'
menu :project_menu, :risks, { :controller => 'risks', :action => 'index' }, :caption => :label_risks, :before => :settings, :param => :project_id
menu :project_menu, :new_risk, { :controller => 'risks', :action => 'new' }, :caption => :label_new_risk, :after => :new_wiki_sub, :param => :project_id, :parent => :new_object
project_module :risks do
permission :view_risks, { :risks => [:index, :show] }, :read => true
permission :add_risks, { :risks => [:new, :create, :commit] }
permission :edit_risks, { :risks => [:edit, :update] }
permission :delete_risks, { :risks => [:destroy] }, :require => :member
# Related issues
permission :manage_risk_relations, {}
end
# Pulls are added to the activity view
activity_provider :risks, :class_name => ['Risk', 'Journal']
end
require File.dirname(__FILE__) + '/lib/redmine_risks'