diff --git a/README.md b/README.md
index 308f5c7..4774aa6 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,7 @@ This plugin uses [FontAwesome icons 4.7](https://fontawesome.com/v4.7.0/)
### 🆕 Changelog
+* **v 0.7.1** : Fixed incorrect DOM structure if user has read only access to the issue (#61 #64)
* **v 0.7.0** : Category filter by project added (#55) and prevent dialog closing when using fa-pencil selector (#59)
* **v 0.6.9** : Category field support (Github request #54)
* **v 0.6.8** : Checkboxes custom fields fixed (#53)
diff --git a/init.rb b/init.rb
index 2f7cc9f..d23fa4c 100644
--- a/init.rb
+++ b/init.rb
@@ -6,7 +6,7 @@ Redmine::Plugin.register :redmine_issue_dynamic_edit do
name 'Redmine Dynamic edit Issue plugin'
author 'Hugo Zilliox'
description 'Allows users to dynamically update issue attributes in detailed view without refreshing the page (JIRA style)'
- version '0.7.0'
+ version '0.7.1'
url 'https://github.com/ilogeek/redmine_issue_dynamic_edit'
author_url 'https://hzilliox.fr'
end
diff --git a/lib/details_issue_hooks.rb b/lib/details_issue_hooks.rb
index 76c664b..fc9aaa3 100644
--- a/lib/details_issue_hooks.rb
+++ b/lib/details_issue_hooks.rb
@@ -11,13 +11,17 @@ class DetailsIssueHooks < Redmine::Hook::ViewListener
def view_layouts_base_html_head(context)
return unless current_is_detail_page(context)
- stylesheet_link_tag('issue_dynamic_edit.css', :plugin => :redmine_issue_dynamic_edit)
+ if User.current.allowed_to?(:edit_issues, context[:project])
+ stylesheet_link_tag('issue_dynamic_edit.css', :plugin => :redmine_issue_dynamic_edit)
+ end
end
def view_layouts_base_body_bottom(context)
return unless current_is_detail_page(context)
- javascript_include_tag('issue_dynamic_edit_configuration_file.js', 'issue_dynamic_edit.js', :plugin => :redmine_issue_dynamic_edit)
+ if User.current.allowed_to?(:edit_issues, context[:project])
+ javascript_include_tag('issue_dynamic_edit_configuration_file.js', 'issue_dynamic_edit.js', :plugin => :redmine_issue_dynamic_edit)
+ end
end
def view_issues_show_details_bottom(context = {})
@@ -55,7 +59,8 @@ class DetailsIssueHooks < Redmine::Hook::ViewListener
allRequiredFieldsFilled
)
o << ""
- o << ""
+ o << ""
+ o << " "
+ o << ""
end
# Users dropdown
@@ -74,7 +81,8 @@ class DetailsIssueHooks < Redmine::Hook::ViewListener
!readOnlyAttributes.include?('assigned_to_id')
)
o << ""
- o << "