-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.rb
23 lines (20 loc) · 938 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
# Redmine sample plugin
require 'redmine'
Redmine::Plugin.register "redmine_score_plugin" do
name 'Project Scores Plugin'
author 'Eric Davis of Little Stream Software'
description 'This is a scoring plugin for Redmine that will allow projects to be scored'
version '0.0.1'
# This plugin adds a project module
# It can be enabled/disabled at project level (Project settings -> Modules)
project_module :score_module do
# This permission has to be explicitly given
# It will be listed on the permissions screen
permission :view_scores, {:scores => [:index]}
permission :edit_scores, {:scores => [:edit]}
permission :view_score_options, {:score_options => [:index]}
permission :edit_score_options, {:score_options => [:edit]}
end
# A new item is added to the project menu (because Redmine can't add it anywhere else)
menu :project_menu, "Scores", :controller => 'scores', :action => 'index'
end