This repository has been archived by the owner on Mar 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
init.rb
66 lines (59 loc) · 2.86 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright (C) 2009 Isotrol S.A.
# Contribution: Nicolas Bertet, Chief project. José Cano Ruiz, Developer.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>, or contact
# us at Isotrol S.A. Edificio BLUENET. Avda. Isaac Newton nº 3, 4ª planta.
# Parque Tecnológico Cartuja ´93, 41092 Sevilla.
#
# *************************************************************************
#
# Licensed under the EUPL, Version 1.1 or – as soon they will be approved by
# the European Commission – subsequent versions of the EUPL (the "Licence");
# you may not use this work except in compliance with the Licence.
#
# You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/7330l5
# or contact us at Isotrol S.A. Edificio BLUENET. Avda. Isaac Newton nº 3,
# 4ª planta. Parque Tecnológico Cartuja ´93, 41092 Sevilla
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the Licence is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied.
#
# See the Licence for the specific language governing permissions and limitations
# under the Licence.
require 'redmine'
Redmine::Plugin.register :redmine_risks do
name 'Redmine risks plugin'
author 'Isotrol S.A. && Daniel Neis Araujo'
description 'Risk plugin'
version '1.0.1'
menu :project_menu, :risks,
{:controller => 'project_risks', :action => 'index'},
:caption => :risks_label, :param => :project_id
menu :top_menu,
:risk_admin,
{:controller => 'risk_categories', :action => 'index'},
:if => Proc.new{User.current.allowed_to?( { :controller => 'risk_categories', :action => 'index' } , nil, :global => true)},
:caption => :risks_label
project_module :risks do
permission :project_risks,
:project_risks => [:index, :create ,:show, :update, :destroy, :issues_index, :issues_new , :issues_delete],
:project_incidents => [:index, :create ,:show, :update, :destroy, :issues_index, :issues_new , :issues_delete],
:risk_list=> [:index],
:project_risk_statistics=> [:index]
end
permission :risk_admin_permission,
:risk_categories => [:index, :create ,:show, :update, :delete],
:risks => [:index, :create ,:show, :update, :delete]
end