Merge pull request #4564 from okriuchykhin/ok_SCI_7360_v3

Fix repository permissions helper [SCI-7360]
This commit is contained in:
Alex Kriuchykhin 2022-10-21 14:58:34 +02:00 committed by GitHub
commit 224bbe9afd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,7 @@ Canaid::Permissions.register_for(Repository) do
delete_repository_rows)
.each do |perm|
can perm do |user, repository|
next false if repository.shared_with?(user.current_team) && !repository.shared_with_write?(user.current_team)
repository.shared_with?(user.current_team) ? repository.shared_with_write?(user.current_team) : true
end
end