Skip to content

Commit

Permalink
Merge pull request #1730 from sul-dlss/location-message
Browse files Browse the repository at this point in the history
  • Loading branch information
mjgiarlo authored Nov 10, 2023
2 parents e1c4217 + 2e162e1 commit a11ac5f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/javascript/src/controllers/auth_restriction_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class extends Controller {
} else if (status.includes('stanford_restricted')) {
this.displayStanfordRestriction(authResponse.service)
} else if (status.includes('location_restricted')) {
this.displayLocationRestriction(authResponse.service)
this.displayLocationRestriction(authResponse.location)
}
}

Expand All @@ -30,7 +30,8 @@ export default class extends Controller {
this.stanfordRestrictionTarget.hidden = false
}

displayLocationRestriction(_loginService) {
displayLocationRestriction(restrictionLocation) {
this.locationRestrictionTarget.querySelector('.loginMessage').innerText = `Access is restricted to the ${restrictionLocation.label}. See Access conditions for more information.`
this.locationRestrictionTarget.hidden = false
}

Expand Down

0 comments on commit a11ac5f

Please sign in to comment.