refactor: introduce authorize_with_unit_primitive_header
What does this merge request do and why?
This MR introduces authorize_with_unit_primitive_header
decorator so that we can DRYs up the authorization logic.
We'll iterate on the authorizer for https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/issues/487+.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Edited by Shinya Maeda