Change `Vulnerability*Finder` interaction with archived projects
In [issue 213144][0] we defined new default expected behavior. We want the default behavior for all finders to be: Do not include vulnerability` or `vulnerability_read` objects in the result-set if the project they are associated with is currently `archived` At the same time we want to, in a followup commit, provide API access to toggle on/off the inclusion of `archived` objects While implementing this behavior the following behavior was encountered: 1. `vulnerability_read` vs `vulnerability` differences The [existing behavior][1] of `Group.vulnerabilities` is to ignore vulnerabilities associated with archived projects. The [existing behavior][2] of `Group.vulnerability_reads` does not necessarily account for the archived status of associated projects This commit unifies both to ignoring archive status, leaving that to be done in filters for the finders. [0]:https://gitlab.com/gitlab-org/gitlab/-/issues/213144 [1]:https://gitlab.com/gitlab-org/gitlab/-/blob/45e01fad9dffb4c447bf701e040d552077f60dac/ee/app/models/ee/group.rb#L555-557 [2]:https://gitlab.com/gitlab-org/gitlab/-/blob/45e01fad9dffb4c447bf701e040d552077f60dac/ee/app/models/ee/group.rb#L559-561 Changelog: fixed EE: true
显示
- ee/app/finders/security/vulnerabilities_finder.rb 18 个添加, 2 个删除ee/app/finders/security/vulnerabilities_finder.rb
- ee/app/finders/security/vulnerability_reads_finder.rb 18 个添加, 2 个删除ee/app/finders/security/vulnerability_reads_finder.rb
- ee/app/models/concerns/vulnerability_scopes.rb 2 个添加, 1 个删除ee/app/models/concerns/vulnerability_scopes.rb
- ee/app/models/ee/group.rb 3 个添加, 1 个删除ee/app/models/ee/group.rb
- ee/spec/finders/security/vulnerabilities_finder_spec.rb 57 个添加, 7 个删除ee/spec/finders/security/vulnerabilities_finder_spec.rb
- ee/spec/finders/security/vulnerability_reads_finder_spec.rb 58 个添加, 6 个删除ee/spec/finders/security/vulnerability_reads_finder_spec.rb
- ee/spec/models/ee/group_spec.rb 2 个添加, 2 个删除ee/spec/models/ee/group_spec.rb
- ee/spec/support/shared_examples/models/vulnerability_and_finding_shared_examples.rb 25 个添加, 15 个删除...mples/models/vulnerability_and_finding_shared_examples.rb
加载中
想要评论请 注册 或 登录