Skip to content

Commit

Permalink
[5.4] MSTR-328: Fix issue where masquerading an account loses the val…
Browse files Browse the repository at this point in the history
…ues from account.metadata (#1255)
  • Loading branch information
pcandia authored Jan 8, 2025
1 parent 9f39f87 commit f73c992
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/apps/core/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ define(function(require) {
},
success: function(data, status) {
self.triggerMasquerading({
account: data.data,
account: _.chain(data.metadata).pick(['billing_mode', 'enabled', 'superduper_admin', 'wnm_allow_additions', 'created', 'is_reseller', 'reseller_id']).merge(data.data).value(),
callback: function() {
var currentApp = monster.apps.getActiveApp();
if (currentApp in monster.apps) {
Expand Down Expand Up @@ -486,8 +486,8 @@ define(function(require) {
monster.apps.auth.currentAccount = $.extend(true, {}, account);
self.updateApps(account.id);

monster.apps.auth.currentAccount.reseller_id = _.get(args, 'account.metadata.reseller_id');
monster.apps.auth.currentAccount.is_reseller = _.get(args, 'account.metadata.is_reseller');
monster.apps.auth.currentAccount.reseller_id = _.get(args, 'account.reseller_id');
monster.apps.auth.currentAccount.is_reseller = _.get(args, 'account.is_reseller');

monster.pub('myaccount.renderNavLinks', {
name: account.name,
Expand Down

0 comments on commit f73c992

Please sign in to comment.