Fix NoMethodError when accessing protected environment for job
What does this MR do?
When checking if a job can be :update_build by a user, this user is then passed all the way to ProtectedEnvironment::DeployAccessLevel. As this user can be nil, we return false if so.
Related issue: #30452 (closed)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Edited by Thong Kuah