Skip to content

Commit

Permalink
Merge pull request #2463 from jhadvig/check_auths
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue.

Check for 'auths' field for both dockerconfig secrets types

@jwforres @spadgett this should check for the `auths` field no matter if its the new or old format

PTAL
  • Loading branch information
openshift-merge-robot authored Nov 6, 2017
2 parents 228caa6 + 7651ad3 commit 766b9b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions app/scripts/services/secrets.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ angular.module("openshiftConsole")
handleDecodeException(e, configType);
}

if (configType === ".dockercfg") {
_.each(decodedData, function(serverData, serverName) {
decodedSecretData.auths[serverName] = getServerParams(serverData);
});
} else {
if (decodedData.auths) {
_.each(decodedData.auths, function(serverData, serverName) {
if (!serverData.auth) {
decodedSecretData.auths[serverName] = serverData;
Expand All @@ -104,6 +100,10 @@ angular.module("openshiftConsole")
if (decodedData.credsStore) {
decodedSecretData.credsStore = decodedData.credsStore;
}
} else {
_.each(decodedData, function(serverData, serverName) {
decodedSecretData.auths[serverName] = getServerParams(serverData);
});
}

return decodedSecretData;
Expand Down
8 changes: 4 additions & 4 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3197,11 +3197,11 @@ n = JSON.parse(window.atob(e));
} catch (e) {
a(e, t);
}
return ".dockercfg" === t ? _.each(n, function(e, t) {
o.auths[t] = r(e);
}) : (_.each(n.auths, function(e, t) {
return n.auths ? (_.each(n.auths, function(e, t) {
e.auth ? o.auths[t] = r(e) : o.auths[t] = e;
}), n.credsStore && (o.credsStore = n.credsStore)), o;
}), n.credsStore && (o.credsStore = n.credsStore)) : _.each(n, function(e, t) {
o.auths[t] = r(e);
}), o;
};
return {
groupSecretsByType: function(e) {
Expand Down

0 comments on commit 766b9b8

Please sign in to comment.