Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

Commit

Permalink
fix: todo comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Dara Hayes committed Aug 21, 2018
1 parent 690e499 commit 0b380c3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/lib/schemaDirectives/hasRole.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ class HasRoleDirective extends SchemaDirectiveVisitor {
field.resolve = async function (root, args, context, info) {
log.info('checking has role directive', role)
log.info('Printing user', context.request.session)
// context.request.kauth.grant.access_token.hasRealmRole(role)
// TODO - figure out how to check does the logged in user have the correct role
// using the keycloak-connect library
// TODO if (context.request.kauth.grant.access_token.hasRealmRole(role))
// Return appropriate error if this is false
const result = await resolve.apply(this, [root, args, context, info])
return result
}
Expand Down

0 comments on commit 0b380c3

Please sign in to comment.