Skip to content

Commit

Permalink
Merge pull request #1511 from alesstimec/fix-get-application-offer-co…
Browse files Browse the repository at this point in the history
…nsume-details-01

chore(internal/jujuclient/applicationoffers.go): add a godoc explaining the usertag field
  • Loading branch information
alesstimec authored Jan 8, 2025
2 parents af73643 + e3ae263 commit 4ee7344
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/jujuclient/applicationoffers.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ func (c Connection) GetApplicationOfferConsumeDetails(ctx context.Context, user
OfferURLs: []string{info.Offer.OfferURL},
BakeryVersion: v,
},
// We need to specify the user tag, because the juju controller returns a macaroon
// with a third party caveat instructing the discharger to verify that the stated
// user has `consume` access to the offer. If the user tag is left empty juju
// will assume the logged-in user and since jimm is dialing the controller as
// `admin` user that causes an issue.
UserTag: user.String(),
}

Expand Down

0 comments on commit 4ee7344

Please sign in to comment.