Merge pull request #3390 from artoscinote/ma_SCI_5634

Fix illegal return statement [SCI-5634]
This commit is contained in:
artoscinote 2021-06-15 13:34:27 +02:00 committed by GitHub
commit 2033d098ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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