We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 407f972 commit 2ae72edCopy full SHA for 2ae72ed
lib/redmine_gtt/patches/issue_patch.rb
@@ -9,7 +9,10 @@ def self.apply
9
Issue.prepend GeojsonAttribute
10
Issue.class_eval do
11
safe_attributes "geojson",
12
- if: ->(issue, user){ user.allowed_to?(:edit_issues, issue.project)}
+ if: ->(issue, user){
13
+ perm = issue.new_record? ? :add_issues : :edit_issues
14
+ user.allowed_to? perm, issue.project
15
+ }
16
end
17
18
0 commit comments