diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-02-22 12:41:33 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-03-17 07:39:15 +0100 |
commit | 8d1b7f950708a0b759026816fcadb6324b29a208 (patch) | |
tree | c867371bfc7280f2496dfaf8aa3baa64aa7b7651 /app/services | |
parent | 14c983fb696b7b75065df2b5defd458e563444e3 (diff) | |
download | gitlab-ce-8d1b7f950708a0b759026816fcadb6324b29a208.tar.gz |
Add issue move ability and use it in move service
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/issues/move_service.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/services/issues/move_service.rb b/app/services/issues/move_service.rb index 2cba6147429..8a39e2d5f4d 100644 --- a/app/services/issues/move_service.rb +++ b/app/services/issues/move_service.rb @@ -34,17 +34,14 @@ module Issues end def move? - return false unless @project_new - return false unless @issue_new - return false unless can_move? - - true + @project_new && can_move? end private def can_move? - true + can?(@current_user, :move_issue, @project_old) && + can?(@current_user, :move_issue, @project_new) end def open_new_issue |