Check if user can update the issue before moving it betweens lists

This commit is contained in:
Douglas Barbosa Alexandre 2016-07-28 03:45:24 -03:00
parent 115fca13c3
commit 22b8c0b7ae

View file

@ -9,6 +9,7 @@ module Boards
def execute
return false unless issue.present?
return false unless user.can?(:update_issue, issue)
update_service.execute(issue)
reopen_service.execute(issue) if moving_from.done?