Correct PrinciplaType for multiple extension of User models

This commit is contained in:
akki-ng 2017-10-31 16:21:24 +05:30
parent cb600d1470
commit a67ec247f4
1 changed files with 3 additions and 1 deletions

View File

@ -88,7 +88,9 @@ function AccessContext(context) {
var token = this.accessToken || {};
if (token.userId) {
this.addPrincipal(Principal.USER, token.userId);
var userPrincipalType =
(this.accessToken && this.accessToken.principalType) || Principal.USER;
this.addPrincipal(userPrincipalType, token.userId);
}
if (token.appId) {
this.addPrincipal(Principal.APPLICATION, token.appId);