Fixed permission error when moving a freshly cloned task.

This commit is contained in:
Matej Zrimšek 2018-02-09 18:50:23 +01:00
parent 68206cb591
commit 946f516171

View file

@ -127,7 +127,7 @@ class CanvasController < ApplicationController
unless to_move.is_a?(Hash) && unless to_move.is_a?(Hash) &&
to_move.keys.all? do |id| to_move.keys.all? do |id|
id.is_a?(String) && id.is_a?(String) &&
can_manage_module?(MyModule.find_by_id(id)) (!is_int?(id) || can_manage_module?(MyModule.find_by_id(id)))
end && end &&
to_move.values.all? do |exp_id| to_move.values.all? do |exp_id|
exp_id.is_a?(String) && exp_id.is_a?(String) &&