Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
fix: ensure context key is logged in error
Browse files Browse the repository at this point in the history
  • Loading branch information
darahayes committed May 13, 2020
1 parent 10ad59e commit 4839e63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/directives/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CONTEXT_KEY } from '../KeycloakContext'
*/
export function isAuthorizedByRole(roles: string[], context?: any) {
if (!(context && context[CONTEXT_KEY])) {
console.error('context.kauth is missing. Keycloak integration is probably misconfigured')
console.error(`context.${CONTEXT_KEY} is missing. Keycloak integration is probably misconfigured`)
return false
}

Expand Down

0 comments on commit 4839e63

Please sign in to comment.