Fix repository permissions helper [SCI-7360]

This commit is contained in:
Oleksii Kriuchykhin 2022-10-21 14:51:16 +02:00
parent 3bc3036b58
commit d38556e3fa

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