Correct PrinciplaType for multiple extension of User models
This commit is contained in:
parent
cb600d1470
commit
a67ec247f4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue