Fix illegal return statement [SCI-5634]

This commit is contained in:
Martin Artnik 2021-06-15 13:16:51 +02:00
parent b7513c6d5f
commit 5137a5b1a3

View file

@ -25,9 +25,11 @@ Canaid::Permissions.register_for(Asset) do
when Result
can_manage_result?(object)
when RepositoryCell
return false if object.repository_column.repository.is_a?(RepositorySnapshot)
can_manage_repository?(user, object.repository_column.repository)
if object.repository_column.repository.is_a?(RepositorySnapshot)
false
else
can_manage_repository?(user, object.repository_column.repository)
end
end
end
end