Ensure user is authorized to push NuGet packages

What does this MR do and why?

Ensure user is authorized to push NuGet packages

Currently, the service Packages::Nuget::CreateOrUpdatePackageService is not checking if the user is authorized to push NuGet packages.

This MR adds the authorization check to the service.

Tests are also included in this MR.

Changelog: other

🛠️ with ❤️ at Siemens

References

Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

Screenshots or screen recordings

Only backend changes.

How to set up and validate locally

  1. Run the tests
bundle rspec spec/services/packages/nuget/create_or_update_package_service_spec.rb spec/services/packages/nuget/create_temporary_package_service_spec.rb

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

MR Checklist (@gerardo-navarro)

Related to #323972

Edited by Gerardo Navarro

Merge request reports

Loading