-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinit.rb
More file actions
37 lines (29 loc) · 1.23 KB
/
Copy pathinit.rb
File metadata and controls
37 lines (29 loc) · 1.23 KB
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
require 'redmine_questions'
Redmine::Plugin.register :redmine_questions do
name 'Redmine Q&A plugin'
author 'RedmineCRM'
description 'This is a Q&A plugin for Redmine'
version '0.0.5'
url 'http://www.redminecrm.com/projects/questions'
author_url 'mailto:support@redminecrm.com'
requires_redmine :version_or_higher => '2.1.2'
settings :default => {
:notice_message => '*Can\'t find the answer you\'re looking for?* Email us at ...'
}, :partial => 'settings/questions'
permission :view_questions, {
:questions => [:index, :autocomplete_for_topic, :topics]
}
delete_menu_item(:top_menu, :help)
menu :top_menu, :questions, {:controller => 'questions', :action => 'index'},
:last => true,
:caption => :label_questions,
:if => Proc.new {User.current.allowed_to?({:controller => 'questions', :action => 'index'}, nil, {:global => true})}
Redmine::AccessControl.map do |map|
map.project_module :boards do |map|
map.permission :view_questions, {:questions => [:autocomplete_for_topic, :topics]}
map.permission :vote_messages, {:questions => [:vote]}
map.permission :convert_issues, {:questions => [:convert_issue]}
map.permission :edit_messages_tags, {}
end
end
end