Skip to content

Commit

Permalink
PSVAMB-14598: always return impersonated partnerId to media-server pa… (
Browse files Browse the repository at this point in the history
#629)

* PSVAMB-14598: always return impersonated partnerId to media-server partnerId

* PSVAMB-14598: add comments
  • Loading branch information
noam-arad authored Jun 23, 2020
1 parent 3824689 commit 9869b13
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/BackendClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,7 @@ var BackendClient = (function(){
logger.debug("[%s] Calling flavorParamsListAction. Hostname: [%s], serverIndex: [%s], Application: [%s]", entryObject.entryId, mediaServerHostname, entryObject.serverType, applicationName);

//Impersonate call to the entry's partnerId to execute the call in the partner's context
let partnerId = entryObject.partnerId;
client.setPartnerId(partnerId);
client.setPartnerId(entryObject.partnerId);
filter.idIn = flavors.join(',');
client.flavorParams.listAction((result, error, headers)=> {
printAPIResponse(result, headers);
Expand All @@ -296,7 +295,8 @@ var BackendClient = (function(){

deferred.resolve(res);
}, filter);

//Remove impersonation
client.setPartnerId(partnerId);
return deferred.promise;
}

Expand Down Expand Up @@ -418,7 +418,8 @@ var BackendClient = (function(){
deferred.reject(new Error(errMsg));
}
});

//Remove impersonation
client.setPartnerId(partnerId);
return deferred.promise;
}

Expand Down Expand Up @@ -506,7 +507,6 @@ var BackendClient = (function(){
function registerToPush(templateSystemName, partnerIdToRegister, params)
{
const deferred = Q.defer();

client.setPartnerId(partnerIdToRegister);
const userParams = {};
userParams.userParams = _.map(params,
Expand Down

0 comments on commit 9869b13

Please sign in to comment.