OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/init.rb

109 lines
4.6 KiB

15 years ago
require 'redmine'
require 'dispatcher'
Dispatcher.to_prepare do
require_dependency 'issue'
14 years ago
if Issue.const_defined? "SAFE_ATTRIBUTES"
Issue::SAFE_ATTRIBUTES << "story_points"
Issue::SAFE_ATTRIBUTES << "remaining_hours"
Issue::SAFE_ATTRIBUTES << "position"
else
Issue.safe_attributes "story_points", "remaining_hours", "position"
end
require_dependency 'redmine_backlogs/issue_view'
require_dependency 'redmine_backlogs/issue_form'
require_dependency 'projects_helper_patch'
require_dependency 'redmine_backlogs/hooks'
require_dependency 'redmine_backlogs/patches/issue_patch'
require_dependency 'redmine_backlogs/patches/issue_status_patch'
require_dependency 'redmine_backlogs/patches/my_controller_patch'
require_dependency 'redmine_backlogs/patches/project_patch'
require_dependency 'redmine_backlogs/patches/projects_controller_patch'
require_dependency 'redmine_backlogs/patches/query_patch'
require_dependency 'redmine_backlogs/patches/user_patch'
require_dependency 'redmine_backlogs/patches/version_controller_patch'
require_dependency 'redmine_backlogs/patches/version_patch'
end
15 years ago
Redmine::Plugin.register :redmine_backlogs do
name 'Redmine Backlogs'
author 'relaxdiego, friflaj, Gregor Schmidt, Jens Ulferts'
description 'A plugin for agile teams'
13 years ago
version '0.11.0'
15 years ago
requires_redmine_plugin 'chiliproject_nissue', '0.1.0'
Redmine::AccessControl.permission(:edit_project).actions << "projects/project_issue_statuses"
14 years ago
settings :default => {
:story_trackers => nil,
:task_tracker => nil,
:card_spec => nil
},
:partial => 'shared/settings'
15 years ago
project_module :backlogs do
# SYNTAX: permission :name_of_permission, { :controller_name => [:action1, :action2] }
14 years ago
# Master backlog permissions
14 years ago
permission :view_master_backlog, {
:rb_master_backlogs => :show,
:rb_sprints => [:index, :show],
:rb_wikis => :show,
:rb_stories => [:index, :show],
:rb_queries => :show,
:rb_server_variables => :show,
:rb_burndown_charts => :show,
:issue_boxes => :show
}
14 years ago
permission :view_taskboards, {
:rb_taskboards => :show,
:rb_sprints => :show,
:rb_stories => [:index, :show],
:rb_tasks => [:index, :show],
:rb_impediments => [:index, :show],
:rb_wikis => :show,
:rb_server_variables => :show,
:rb_burndown_charts => :show
}
# Sprint permissions
# :show_sprints and :list_sprints are implicit in :view_master_backlog permission
14 years ago
permission :update_sprints, {
:rb_sprints => [:edit, :update],
:rb_wikis => [:edit, :update]
}
14 years ago
# Story permissions
# :show_stories and :list_stories are implicit in :view_master_backlog permission
permission :create_stories, { :rb_stories => :create }
permission :update_stories, { :rb_stories => :update,
:issue_boxes => [:edit, :update] }
14 years ago
# Task permissions
# :show_tasks and :list_tasks are implicit in :view_sprints
permission :create_tasks, { :rb_tasks => [:new, :create] }
permission :update_tasks, { :rb_tasks => [:edit, :update],
:issue_boxes => [:edit, :update] }
14 years ago
# Impediment permissions
# :show_impediments and :list_impediments are implicit in :view_sprints
permission :create_impediments, { :rb_impediments => [:new, :create] }
permission :update_impediments, { :rb_impediments => [:edit, :update],
:issue_boxes => [:edit, :update] }
end
14 years ago
menu :project_menu,
:backlogs,
{:controller => :rb_master_backlogs, :action => :show},
:caption => :project_module_backlogs,
:after => :new_issue,
14 years ago
:param => :project_id
14 years ago
end