Skip to content

Commit

Permalink
Merge pull request #3 from yoshida3669/fix_issue_22
Browse files Browse the repository at this point in the history
Fix issue Restream#22 and Restream#23
  • Loading branch information
yoshida3669 authored Apr 4, 2017
2 parents 96fd265 + 26b6be8 commit f33fb3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/views/issues/_checklist_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class: 'tag-add icon icon-add' %>
<%= file_field_tag 'import_checklist',
id: 'import_checklist_items_input',
accept: 'text/plain' %>
accept: 'text/plain' if User.current.allowed_to?(:import_checklists, @project) %>

<%= javascript_tag "observeIssueChecklistField('checklist_form_items', 'add_checklist_item_input', 'add_checklist_item_button', 'import_checklist_items_input');" %>
<%= javascript_tag "createIssueChecklist(#{@issue.checklist.collect { |cli| { is_done: cli.is_done, subject: cli.subject, id: cli.id } }.to_json.html_safe});" %>
Expand Down
16 changes: 7 additions & 9 deletions init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@

requires_redmine version_or_higher: '2.0.0'

project_module :issue_checklist do
permission :view_checklists, {}
permission :done_checklists, { issue_checklist: :done }
permission :edit_checklists, :issue_checklist => [:delete, :done]
permission :import_checklists, {}
end

settings default: {
save_log: false,
issue_done_ratio: false
}, partial: 'settings/issue_checklist'

Redmine::AccessControl.map do |map|
map.project_module :issue_tracking do |map|
map.permission :view_checklists, {}
map.permission :done_checklists, { issue_checklist: :done }
map.permission :edit_checklists, { issue_checklist: :delete, issue_checklist: :done }
end
end

end

0 comments on commit f33fb3d

Please sign in to comment.