Skip to content

Commit

Permalink
Merge pull request #1173 from guardian/an/local-permissions-from-code
Browse files Browse the repository at this point in the history
make permissions load from CODE, even if running locally
  • Loading branch information
andrew-nowak authored Aug 21, 2024
2 parents 0901331 + 35d1dc8 commit a8d7c40
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/di.scala
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ class MediaAtomMaker(context: Context)

private val aws = new AWSConfig(config, credentials)

private val permissions = new MediaAtomMakerPermissionsProvider(aws.stage, aws.region.getName, aws.credentials.instance.awsV1Creds)
private val permissionsStage = aws.stage match {
case "PROD" => "PROD"
case _ => "CODE"
}

private val permissions = new MediaAtomMakerPermissionsProvider(permissionsStage, aws.region.getName, aws.credentials.instance.awsV1Creds)

private val hmacAuthActions = new PanDomainAuthActions {
override def conf: Configuration = MediaAtomMaker.this.configuration
Expand Down

0 comments on commit a8d7c40

Please sign in to comment.