refactor: user `can` method to check UPs in agents
What does this merge request do and why?
chore: user can
method to check UPs in agents
This makes it so our Agent UP checking logic fully utilizes our
authorization stack, which makes it possible for example to bypass it
with the AIGW_AUTH__BYPASS_EXTERNAL
env variable (which the Agents are
not respecting currently)
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.