Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(internal/jujuclient/applicationoffers.go): set user when getting …
…offer consume details When getting consume details for an application offer the juju controller will, among other things, also return a macaroon that is passed to the consuming side. That macaroon contains a third party caveat addressed to JIMM in which it instructs JIMM to verify that the user is consumer of the application offer. Previously we were passing in an empty user tag which meant that Juju added that 3rd party caveat for the authenticated user and since JIMM always dials the juju controller as user `admin` that caveat was instructing JIMM to check that the `admin` user has `consume` access to the application offer. This PR proposes one way to fix is, which is to specify the user when getting consume details from the controller. The other way would be to dial the controller as the logged-in user.
- Loading branch information