Skip to content
Permalink
Browse files

Fix for role mapping. When LDAP is used, openremote can be missing

  • Loading branch information...
Michael Rademaker
Michael Rademaker committed Jun 12, 2019
1 parent 58c0562 commit 2487b392088a0cb8fbc3ea0dc16055a6fbedf00b
Showing with 5 additions and 1 deletion.
  1. +5 −1 ui/component/core/src/index.ts
@@ -717,7 +717,11 @@ export class Manager implements EventProviderFactory {

this._name = this._keycloak.tokenParsed.name;
this._username = this._keycloak.tokenParsed.preferred_username;
this._roles = this._keycloak.resourceAccess.openremote.roles;
if (this._keycloak.resourceAccess.openremote) {
this._roles = this._keycloak.resourceAccess.openremote.roles;
} else {
this._roles = this._keycloak.resourceAccess.account.roles;
}

// Update the access token every 10s (note keycloak will only update if expiring within configured
// time period.

0 comments on commit 2487b39

Please sign in to comment.
You can’t perform that action at this time.