Skip to content

Commit

Permalink
Add the location to the restriction
Browse files Browse the repository at this point in the history
Fixes #1671
  • Loading branch information
jcoyne committed Nov 10, 2023
1 parent 6a4128c commit 2e162e1
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 2e162e1

Please sign in to comment.