From 26b6be82a868911a9ee6053a02c4b2dd88cc6578 Mon Sep 17 00:00:00 2001 From: yoshida3669 <--global> Date: Mon, 3 Apr 2017 13:43:18 +0000 Subject: [PATCH] Fix issue #23 --- app/views/issues/_checklist_form.html.erb | 2 +- init.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/issues/_checklist_form.html.erb b/app/views/issues/_checklist_form.html.erb index ca5e542..59d3509 100644 --- a/app/views/issues/_checklist_form.html.erb +++ b/app/views/issues/_checklist_form.html.erb @@ -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});" %> diff --git a/init.rb b/init.rb index 450de9c..d227104 100644 --- a/init.rb +++ b/init.rb @@ -16,6 +16,7 @@ permission :view_checklists, {} permission :done_checklists, { issue_checklist: :done } permission :edit_checklists, :issue_checklist => [:delete, :done] + permission :import_checklists, {} end settings default: {