-
Stan Hu authored
When viewing a specific pipeline, we check whether the user has permission to deploy a build by calling `build.project.protected_environment_accessible_to?`. Previously this led to one SQL query per build in the pipeline. To fix this, we cache protected environments by name during a request. Closes https://gitlab.com/gitlab-org/gitlab/issues/55346
9ed56bb0