Skip to content

Commit

Permalink
#373: Self assignment is allowed
Browse files Browse the repository at this point in the history
Fixed #373
  • Loading branch information
dgroup committed Apr 22, 2021
1 parent 113b144 commit a47aef7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/lazylead/task/assignment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@ def initialize(issue, allowed, silent)
# Gives true when last change of "Assignee" field was done
# by not authorized person.
def illegal?
@allowed.none? do |a|
return false if last.nil?
a == last["author"]["name"]
end
return false if last.nil? || @issue.assignee.id.eql?(last["author"]["name"])
@allowed.none? { |a| a.eql? last["author"]["name"] }
end

# Detect details about last change of "Assignee" to non-null value
Expand Down

0 comments on commit a47aef7

Please sign in to comment.