Disable management of repository filters for shared repositories with view permissions [SCI-6489] (#3856)

This commit is contained in:
Alex Kriuchykhin 2022-02-15 14:37:42 +01:00 committed by GitHub
parent 0ce6f43cbf
commit 039c21d603
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,7 +83,7 @@ Canaid::Permissions.register_for(Repository) do
# repository: create/update/delete filters
can :manage_repository_filters do |user, repository|
user.is_normal_user_or_admin_of_team?(repository.team) ||
((repository.team == user.current_team) && user.is_normal_user_or_admin_of_team?(repository.team)) ||
(repository.shared_with_write?(user.current_team) && user.is_normal_user_or_admin_of_team?(user.current_team))
end
end