From 1ca10a8f4dc5fc7d9f92b2c053d2080e824ac790 Mon Sep 17 00:00:00 2001 From: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> Date: Tue, 12 Sep 2023 07:41:33 -0400 Subject: [PATCH 01/12] prepare 2.11.0 release Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> --- lerna.json | 2 +- packages/zowe-explorer-ftp-extension/CHANGELOG.md | 4 ++-- packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json | 3 +-- .../zowe-explorer/i18n/sample/src/dataset/actions.i18n.json | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lerna.json b/lerna.json index e5666da8e0..e49531594a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.11.0-SNAPSHOT", + "version": "2.11.0", "command": { "version": { "forcePublish": true, diff --git a/packages/zowe-explorer-ftp-extension/CHANGELOG.md b/packages/zowe-explorer-ftp-extension/CHANGELOG.md index 3b940ff212..54a1c064d4 100644 --- a/packages/zowe-explorer-ftp-extension/CHANGELOG.md +++ b/packages/zowe-explorer-ftp-extension/CHANGELOG.md @@ -2,10 +2,10 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum ## TBD Release -### New features and enhancements - ### Bug fixes +- Bump `@zowe/zowe-explorer-api` to pick up latest, including `@zowe/secrets-for-zowe-sdk` 7.18.4 to handle install errors gracefully and to allow running without MSVC redistributables. + ## `2.10.0` ### New features and enhancements diff --git a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json index 5885df7642..8c54f161a0 100644 --- a/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/Profiles.i18n.json @@ -27,9 +27,8 @@ "validateProfiles.cancelled": "Validating {0} was cancelled.", "validateProfiles.error": "Profile validation failed for {0}.", "ssoAuth.noBase": "This profile does not support token authentication.", - "ssoLogin.error": "Unable to log in with {0}. {1}", - "ssoLogin.unableToLogin": "Unable to log in with {0}. {1}", "ssoLogin.successful": "Login to authentication service was successful.", + "ssoLogin.error": "Unable to log in with {0}. {1}", "ssoLogout.successful": "Logout from authentication service was successful for {0}.", "ssoLogout.error": "Unable to log out with {0}. {1}", "getConfigLocationPrompt.placeholder.create": "Select the location where the config file will be initialized", diff --git a/packages/zowe-explorer/i18n/sample/src/dataset/actions.i18n.json b/packages/zowe-explorer/i18n/sample/src/dataset/actions.i18n.json index dc19e2af70..aa1718439c 100644 --- a/packages/zowe-explorer/i18n/sample/src/dataset/actions.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/dataset/actions.i18n.json @@ -29,9 +29,9 @@ "createMember.member.validation": "Enter valid member name", "createMember.creating": "Creating new data set member {0}", "createMember.error": "Unable to create member.", + "dataSet.opening": "$(sync~spin) Opening data set...", "openPS.error": "Invalid data set or member.", "openPS.openDataSet": "Opening {0}", - "dataSet.opening": "$(sync~spin) Opening data set...", "createFile.allocatingNewDataSet": "Attempting to allocate new data set", "handleUserSelection.qp.prompt": "Click on parameters to change them", "createFile.inputBox.placeHolder": "Name of Data Set", From a83fe92d58cb06599f8aa5e1e9ec5ea54d7cbc9f Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Tue, 12 Sep 2023 15:42:03 -0400 Subject: [PATCH 02/12] fix issue with checking secureValues Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- packages/zowe-explorer/src/Profiles.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer/src/Profiles.ts b/packages/zowe-explorer/src/Profiles.ts index 8c1070b583..1cdf3bd059 100644 --- a/packages/zowe-explorer/src/Profiles.ts +++ b/packages/zowe-explorer/src/Profiles.ts @@ -1244,9 +1244,16 @@ export class Profiles extends ProfilesCache { * @returns {string[]} an array with the secure properties */ public async getSecurePropsForProfile(profileName: string): Promise { + if (!profileName) { + return []; + } + if ((await this.getProfileInfo()).usingTeamConfig) { + const config = (await this.getProfileInfo()).getTeamConfig(); + return config.api.secure.securePropsForProfile(profileName); + } const profAttrs = await this.getProfileFromConfig(profileName); const mergedArgs = (await this.getProfileInfo()).mergeArgsForProfile(profAttrs); - return [...mergedArgs.knownArgs, ...mergedArgs.missingArgs].filter((arg) => arg.secure).map((arg) => arg.argName); + return mergedArgs.knownArgs.filter((arg) => arg.secure).map((arg) => arg.argName); } private async loginWithBaseProfile(serviceProfile: zowe.imperative.IProfileLoaded, loginTokenType: string, node?: IZoweNodeType): Promise { From 38d2250d11995d8194b38e04c6557f7ac199fea7 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Tue, 12 Sep 2023 15:54:03 -0400 Subject: [PATCH 03/12] fix(ds,uss): Check if profile is invalid before searching Signed-off-by: Trae Yelovich --- packages/zowe-explorer/src/dataset/DatasetTree.ts | 2 +- packages/zowe-explorer/src/uss/USSTree.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/zowe-explorer/src/dataset/DatasetTree.ts b/packages/zowe-explorer/src/dataset/DatasetTree.ts index 8cb3771aff..5a5a54cdfd 100644 --- a/packages/zowe-explorer/src/dataset/DatasetTree.ts +++ b/packages/zowe-explorer/src/dataset/DatasetTree.ts @@ -890,7 +890,7 @@ export class DatasetTree extends ZoweTreeProvider implements IZoweTree 0) { diff --git a/packages/zowe-explorer/src/uss/USSTree.ts b/packages/zowe-explorer/src/uss/USSTree.ts index be393857b9..c681f0d239 100644 --- a/packages/zowe-explorer/src/uss/USSTree.ts +++ b/packages/zowe-explorer/src/uss/USSTree.ts @@ -567,7 +567,7 @@ export class USSTree extends ZoweTreeProvider implements IZoweTree Date: Tue, 12 Sep 2023 16:08:36 -0400 Subject: [PATCH 04/12] chore: Update CHANGELOG Signed-off-by: Trae Yelovich --- packages/zowe-explorer/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index 9fdb0fc6ae..1b5a5e1627 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -16,6 +16,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Bump `@zowe/secrets-for-zowe-sdk` to 7.18.4 to handle install errors gracefully and to allow running without MSVC redistributables. - Fixed issue where data set content does not always appear as soon as the editor is opened. [#2427](https://github.com/zowe/vscode-extension-for-zowe/issues/2427) - Adjust scope of "Security: Secure Credentials Enabled" setting to `machine-overridable` so it appears again in certain cloud IDEs. +- Fixed issue where disabling "Automatic Profile Validation" caused the search prompts to stop appearing for all tree views. [#2454](https://github.com/zowe/vscode-extension-for-zowe/issues/2454) ## `2.10.0` From 1a0dcb14cc158bbb2febc1412d6cb406fecd5201 Mon Sep 17 00:00:00 2001 From: Trae Yelovich Date: Wed, 13 Sep 2023 08:56:09 -0400 Subject: [PATCH 05/12] fix(trees): Check if prof. validation enabled Signed-off-by: Trae Yelovich --- packages/zowe-explorer/src/dataset/DatasetTree.ts | 2 +- packages/zowe-explorer/src/job/ZosJobsProvider.ts | 2 +- packages/zowe-explorer/src/uss/USSTree.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/zowe-explorer/src/dataset/DatasetTree.ts b/packages/zowe-explorer/src/dataset/DatasetTree.ts index 5a5a54cdfd..6a8629f805 100644 --- a/packages/zowe-explorer/src/dataset/DatasetTree.ts +++ b/packages/zowe-explorer/src/dataset/DatasetTree.ts @@ -159,7 +159,7 @@ export class DatasetTree extends ZoweTreeProvider implements IZoweTree Date: Wed, 13 Sep 2023 10:46:56 -0400 Subject: [PATCH 06/12] fix(trees): remove validationStatus check for getChildren Signed-off-by: Trae Yelovich --- packages/zowe-explorer/src/dataset/DatasetTree.ts | 5 ----- packages/zowe-explorer/src/job/ZosJobsProvider.ts | 5 ----- packages/zowe-explorer/src/uss/USSTree.ts | 4 ---- 3 files changed, 14 deletions(-) diff --git a/packages/zowe-explorer/src/dataset/DatasetTree.ts b/packages/zowe-explorer/src/dataset/DatasetTree.ts index 6a8629f805..41e428768d 100644 --- a/packages/zowe-explorer/src/dataset/DatasetTree.ts +++ b/packages/zowe-explorer/src/dataset/DatasetTree.ts @@ -157,11 +157,6 @@ export class DatasetTree extends ZoweTreeProvider implements IZoweTree Date: Wed, 13 Sep 2023 10:52:38 -0400 Subject: [PATCH 07/12] fix(tests): remove tests testing undesired behavior Signed-off-by: Trae Yelovich --- .../__unit__/job/ZosJobsProvider.unit.test.ts | 11 ---------- .../__unit__/uss/USSTree.unit.test.ts | 22 ------------------- 2 files changed, 33 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts index cfe46ec068..da5b74ffa7 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/ZosJobsProvider.unit.test.ts @@ -272,17 +272,6 @@ describe("ZosJobsProvider unit tests - Function getChildren", () => { expect(elementGetChildrenSpy).toHaveBeenCalledTimes(1); }); - it("Tests that getChildren returns the empty array if status of profile is unverified", async () => { - const globalMocks = await createGlobalMocks(); - jest.spyOn(Profiles.getInstance(), "checkCurrentProfile").mockResolvedValueOnce({ status: "unverified" } as any); - const blockMocks = createBlockMocks(globalMocks); - mocked(vscode.window.createTreeView).mockReturnValueOnce(blockMocks.treeView); - const testTree = new ZosJobsProvider(); - testTree.mSessionNodes.push(blockMocks.jobSessionNode); - testTree.mSessionNodes[1].dirty = true; - - await expect(testTree.getChildren(testTree.mSessionNodes[1])).resolves.toEqual([]); - }); }); describe("ZosJobsProvider unit tests - Function initializeFavChildNodeForProfile", () => { diff --git a/packages/zowe-explorer/__tests__/__unit__/uss/USSTree.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/uss/USSTree.unit.test.ts index 183b95b24d..56d20ad5b0 100644 --- a/packages/zowe-explorer/__tests__/__unit__/uss/USSTree.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/uss/USSTree.unit.test.ts @@ -1424,29 +1424,7 @@ describe("USSTree Unit Tests - Function USSTree.getChildren()", () => { expect(loadProfilesForFavoritesSpy).toHaveBeenCalledWith(log, favProfileNode); }); - - it("Testing that getChildren() returns the empty array if the profile has unverified status", async () => { - const globalMocks = await createGlobalMocks(); - - const testDir = new ZoweUSSNode("aDir", vscode.TreeItemCollapsibleState.Collapsed, globalMocks.testTree.mSessionNodes[1], null, "test"); - globalMocks.testTree.mSessionNodes[1].children.push(testDir); - const mockApiResponseItems = { - items: [ - { - mode: "d", - mSessionName: "sestest", - name: "aDir", - }, - ], - }; - const mockApiResponseWithItems = createFileResponse(mockApiResponseItems); - globalMocks.withProgress.mockReturnValue(mockApiResponseWithItems); - jest.spyOn(Profiles.getInstance(), "checkCurrentProfile").mockResolvedValueOnce({ status: "unverified" } as any); - const sessChildren = await globalMocks.testTree.getChildren(globalMocks.testTree.mSessionNodes[1]); - expect(sessChildren.length).toEqual(0); - }); }); - // Idea is borrowed from: https://github.com/kulshekhar/ts-jest/blob/master/src/util/testing.ts const mocked = any>(fn: T): jest.Mock> => fn as any; From 36fe38e86504f789160f6b4c053684bc9e81cdc1 Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Thu, 14 Sep 2023 13:19:00 -0400 Subject: [PATCH 08/12] add fix for object not defined error Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- .../__tests__/__unit__/job/ZoweJobNode.unit.test.ts | 1 + .../i18n/sample/src/dataset/ZoweDatasetNode.i18n.json | 4 +++- .../i18n/sample/src/job/ZoweJobNode.i18n.json | 2 ++ .../i18n/sample/src/uss/ZoweUSSNode.i18n.json | 2 ++ packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts | 7 +++++++ packages/zowe-explorer/src/job/ZoweJobNode.ts | 7 +++++++ packages/zowe-explorer/src/uss/ZoweUSSNode.ts | 7 +++++++ 7 files changed, 29 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts index 9191013f51..2ab7070292 100644 --- a/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/job/ZoweJobNode.unit.test.ts @@ -819,6 +819,7 @@ describe("ZosJobsProvider - getJobs", () => { value: () => ({ getJobsByParameters: false, getJobsByOwnerAndPrefix: () => ["test"], + getSession: () => globalMocks.testSession, }), }); jest.spyOn(Gui, "warningMessage").mockImplementation(); diff --git a/packages/zowe-explorer/i18n/sample/src/dataset/ZoweDatasetNode.i18n.json b/packages/zowe-explorer/i18n/sample/src/dataset/ZoweDatasetNode.i18n.json index 71b5af74f2..32dfe9ccbe 100644 --- a/packages/zowe-explorer/i18n/sample/src/dataset/ZoweDatasetNode.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/dataset/ZoweDatasetNode.i18n.json @@ -3,5 +3,7 @@ "getChildren.error.invalidNode": "Invalid node", "getChildren.responses.error": "The response from Zowe CLI was not successful", "getChildren.invalidMember": "Cannot access member with control characters in the name: {0}", - "getChildren.noDataset": "No data sets found" + "getChildren.noDataset": "No data sets found", + "getDataSets.error.sessionMissing": "Profile auth error", + "getDataSets.error.additionalDetails": "Profile is not authenticated, please log in to continue" } diff --git a/packages/zowe-explorer/i18n/sample/src/job/ZoweJobNode.i18n.json b/packages/zowe-explorer/i18n/sample/src/job/ZoweJobNode.i18n.json index 569bf3852e..9e9e04a0f1 100644 --- a/packages/zowe-explorer/i18n/sample/src/job/ZoweJobNode.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/job/ZoweJobNode.i18n.json @@ -3,5 +3,7 @@ "getChildren.noSpoolFiles": "There are no JES spool messages to display", "getChildren.noJobs": "No jobs found", "getJobs.status.not.supported": "Filtering by job status is not yet supported with this profile type. Will show jobs with all statuses.", + "getJobs.error.sessionMissing": "Profile auth error", + "getJobs.error.additionalDetails": "Profile is not authenticated, please log in to continue", "getChildren.error.response": "Retrieving response from " } diff --git a/packages/zowe-explorer/i18n/sample/src/uss/ZoweUSSNode.i18n.json b/packages/zowe-explorer/i18n/sample/src/uss/ZoweUSSNode.i18n.json index f613e8b554..12ae0c3133 100644 --- a/packages/zowe-explorer/i18n/sample/src/uss/ZoweUSSNode.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/uss/ZoweUSSNode.i18n.json @@ -1,5 +1,7 @@ { "getChildren.error.invalidNode": "Invalid node", + "getChildren.error.sessionMissing": "Profile auth error", + "getChildren.error.additionalDetails": "Profile is not authenticated, please log in to continue", "getChildren.responses.error.response": "The response from Zowe CLI was not successful", "getChildren.error.response": "Retrieving response from ", "getChildren.responses.open": "Open", diff --git a/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts b/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts index 48be0efaf9..2e966abb34 100644 --- a/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts +++ b/packages/zowe-explorer/src/dataset/ZoweDatasetNode.ts @@ -305,6 +305,13 @@ export class ZoweDatasetNode extends ZoweTreeNode implements IZoweDatasetTreeNod ), ]; const mvsApi = ZoweExplorerApiRegister.getMvsApi(cachedProfile); + if (!mvsApi.getSession(mvsApi?.profile)) { + throw new zowe.imperative.ImperativeError({ + msg: localize("getDataSets.error.sessionMissing", "Profile auth error"), + additionalDetails: localize("getDataSets.error.additionalDetails", "Profile is not authenticated, please log in to continue"), + errorCode: `${zowe.imperative.RestConstants.HTTP_STATUS_401}`, + }); + } if (mvsApi.dataSetsMatchingPattern) { responses.push(await mvsApi.dataSetsMatchingPattern(dsPatterns)); } else { diff --git a/packages/zowe-explorer/src/job/ZoweJobNode.ts b/packages/zowe-explorer/src/job/ZoweJobNode.ts index 71a3ff1cd6..1bcc7f86f3 100644 --- a/packages/zowe-explorer/src/job/ZoweJobNode.ts +++ b/packages/zowe-explorer/src/job/ZoweJobNode.ts @@ -341,6 +341,13 @@ export class Job extends ZoweTreeNode implements IZoweJobTreeNode { if (this.searchId.length > 0) { jobsInternal.push(await ZoweExplorerApiRegister.getJesApi(cachedProfile).getJob(searchId)); } else { + if (!ZoweExplorerApiRegister.getJesApi(cachedProfile).getSession(cachedProfile)) { + throw new zowe.imperative.ImperativeError({ + msg: localize("getJobs.error.sessionMissing", "Profile auth error"), + additionalDetails: localize("getJobs.error.additionalDetails", "Profile is not authenticated, please log in to continue"), + errorCode: `${zowe.imperative.RestConstants.HTTP_STATUS_401}`, + }); + } if (ZoweExplorerApiRegister.getJesApi(cachedProfile).getJobsByParameters) { jobsInternal = await ZoweExplorerApiRegister.getJesApi(cachedProfile).getJobsByParameters({ owner, diff --git a/packages/zowe-explorer/src/uss/ZoweUSSNode.ts b/packages/zowe-explorer/src/uss/ZoweUSSNode.ts index 1ac6edd03c..db0f1db14d 100644 --- a/packages/zowe-explorer/src/uss/ZoweUSSNode.ts +++ b/packages/zowe-explorer/src/uss/ZoweUSSNode.ts @@ -170,6 +170,13 @@ export class ZoweUSSNode extends ZoweTreeNode implements IZoweUSSTreeNode { const sessNode = this.getSessionNode(); try { const cachedProfile = Profiles.getInstance().loadNamedProfile(this.getProfileName()); + if (!ZoweExplorerApiRegister.getUssApi(cachedProfile).getSession(cachedProfile)) { + throw new imperative.ImperativeError({ + msg: localize("getChildren.error.sessionMissing", "Profile auth error"), + additionalDetails: localize("getChildren.error.additionalDetails", "Profile is not authenticated, please log in to continue"), + errorCode: `${imperative.RestConstants.HTTP_STATUS_401}`, + }); + } response = await ZoweExplorerApiRegister.getUssApi(cachedProfile).fileList(this.fullPath); // Throws reject if the Zowe command does not throw an error but does not succeed From 8afd2c197d8f5c39d02a31ed7e50fae0b1dd6125 Mon Sep 17 00:00:00 2001 From: Rudy Flores <68666202+rudyflores@users.noreply.github.com> Date: Thu, 14 Sep 2023 16:22:49 -0400 Subject: [PATCH 09/12] fix issue reported from trae Signed-off-by: Rudy Flores <68666202+rudyflores@users.noreply.github.com> --- packages/zowe-explorer/src/utils/ProfilesUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/zowe-explorer/src/utils/ProfilesUtils.ts b/packages/zowe-explorer/src/utils/ProfilesUtils.ts index 03a718f197..142c05befb 100644 --- a/packages/zowe-explorer/src/utils/ProfilesUtils.ts +++ b/packages/zowe-explorer/src/utils/ProfilesUtils.ts @@ -142,7 +142,8 @@ export async function isUsingTokenAuth(profileName: string): Promise { const secureProfileProps = await Profiles.getInstance().getSecurePropsForProfile(profileName); const secureBaseProfileProps = await Profiles.getInstance().getSecurePropsForProfile(baseProfile?.name); if (isUsingZosmf && baseProfile) { - return secureProfileProps.includes("tokenValue") || secureBaseProfileProps.includes("tokenValue"); + const profileUsesBasicAuth = secureProfileProps.includes("user") && secureProfileProps.includes("password"); + return (secureProfileProps.includes("tokenValue") || secureBaseProfileProps.includes("tokenValue")) && !profileUsesBasicAuth; } return secureProfileProps.includes("tokenValue"); } From df6cb22ca6af0e0d9065cb3e17a767316da6a45f Mon Sep 17 00:00:00 2001 From: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> Date: Fri, 15 Sep 2023 09:13:10 -0400 Subject: [PATCH 10/12] update check to include all prof types registered with apiml Signed-off-by: Billie Simmons <49491949+JillieBeanSim@users.noreply.github.com> --- .../i18n/sample/src/utils/ProfilesUtils.i18n.json | 2 +- packages/zowe-explorer/src/utils/ProfilesUtils.ts | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/zowe-explorer/i18n/sample/src/utils/ProfilesUtils.i18n.json b/packages/zowe-explorer/i18n/sample/src/utils/ProfilesUtils.i18n.json index 265cf6e210..2ed2cbc4ff 100644 --- a/packages/zowe-explorer/i18n/sample/src/utils/ProfilesUtils.i18n.json +++ b/packages/zowe-explorer/i18n/sample/src/utils/ProfilesUtils.i18n.json @@ -1,7 +1,7 @@ { "errorHandling.invalid.host": "Required parameter 'host' must not be blank.", "errorHandling.invalid.credentials": "Invalid Credentials for profile '{0}'. Please ensure the username and password are valid or this may lead to a lock-out.", - "errorHandling.invalid.token": "Your connection is no longer active. Please log in to an authentication service to restore the connection.", + "errorHandling.invalid.token": "Your connection is no longer active for profile '{0}'. Please log in to an authentication service to restore the connection.", "errorHandling.authentication.login": "Log in to Authentication Service", "errorHandling.checkCredentials.button": "Update Credentials", "errorHandling.checkCredentials.cancelled": "Operation Cancelled", diff --git a/packages/zowe-explorer/src/utils/ProfilesUtils.ts b/packages/zowe-explorer/src/utils/ProfilesUtils.ts index 142c05befb..612284de16 100644 --- a/packages/zowe-explorer/src/utils/ProfilesUtils.ts +++ b/packages/zowe-explorer/src/utils/ProfilesUtils.ts @@ -66,7 +66,8 @@ export async function errorHandling(errorDetails: Error | string, label?: string ); const errToken = localize( "errorHandling.invalid.token", - "Your connection is no longer active. Please log in to an authentication service to restore the connection." + "Your connection is no longer active for profile '{0}'. Please log in to an authentication service to restore the connection.", + label ); if (label.includes("[")) { label = label.substring(0, label.indexOf(" [")).trim(); @@ -138,14 +139,10 @@ export function isTheia(): boolean { */ export async function isUsingTokenAuth(profileName: string): Promise { const baseProfile = Profiles.getInstance().getDefaultProfile("base"); - const isUsingZosmf = (await Profiles.getInstance().getLoadedProfConfig(profileName)).type === "zosmf"; const secureProfileProps = await Profiles.getInstance().getSecurePropsForProfile(profileName); const secureBaseProfileProps = await Profiles.getInstance().getSecurePropsForProfile(baseProfile?.name); - if (isUsingZosmf && baseProfile) { - const profileUsesBasicAuth = secureProfileProps.includes("user") && secureProfileProps.includes("password"); - return (secureProfileProps.includes("tokenValue") || secureBaseProfileProps.includes("tokenValue")) && !profileUsesBasicAuth; - } - return secureProfileProps.includes("tokenValue"); + const profileUsesBasicAuth = secureProfileProps.includes("user") && secureProfileProps.includes("password"); + return (secureProfileProps.includes("tokenValue") || secureBaseProfileProps.includes("tokenValue")) && !profileUsesBasicAuth; } /** From 76bb298297f7c82485ddb1cdaa7270b4a75bb041 Mon Sep 17 00:00:00 2001 From: zowe-robot Date: Fri, 15 Sep 2023 18:53:00 +0000 Subject: [PATCH 11/12] Bump version to 2.11.0 [ci skip] Signed-off-by: zowe-robot --- packages/eslint-plugin-zowe-explorer/CHANGELOG.md | 2 +- packages/eslint-plugin-zowe-explorer/package.json | 2 +- packages/zowe-explorer-api/CHANGELOG.md | 2 +- packages/zowe-explorer-api/package.json | 2 +- packages/zowe-explorer-ftp-extension/CHANGELOG.md | 2 +- packages/zowe-explorer-ftp-extension/package.json | 4 ++-- packages/zowe-explorer/CHANGELOG.md | 2 +- packages/zowe-explorer/package.json | 6 +++--- .../zowe-explorer/webviews/edit-attributes/package.json | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/eslint-plugin-zowe-explorer/CHANGELOG.md b/packages/eslint-plugin-zowe-explorer/CHANGELOG.md index 0a624a46ea..e9fed4e69b 100644 --- a/packages/eslint-plugin-zowe-explorer/CHANGELOG.md +++ b/packages/eslint-plugin-zowe-explorer/CHANGELOG.md @@ -1,6 +1,6 @@ All notable changes to the "eslint-plugin-zowe-explorer" package will be documented in this file. -## TBD Release +## `2.11.0` ### New features and enhancements diff --git a/packages/eslint-plugin-zowe-explorer/package.json b/packages/eslint-plugin-zowe-explorer/package.json index b695c7afbc..2a3d9097b7 100644 --- a/packages/eslint-plugin-zowe-explorer/package.json +++ b/packages/eslint-plugin-zowe-explorer/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-zowe-explorer", - "version": "2.11.0-SNAPSHOT", + "version": "2.11.0", "description": "Custom ESLint Rules for ZOWE Explorer", "keywords": [ "eslint", diff --git a/packages/zowe-explorer-api/CHANGELOG.md b/packages/zowe-explorer-api/CHANGELOG.md index f20aae61bd..6f5794ea7a 100644 --- a/packages/zowe-explorer-api/CHANGELOG.md +++ b/packages/zowe-explorer-api/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to the "zowe-explorer-api" extension will be documented in this file. -## TBD Release +## `2.11.0` ### New features and enhancements diff --git a/packages/zowe-explorer-api/package.json b/packages/zowe-explorer-api/package.json index c2f80e87a2..4f6509ac85 100644 --- a/packages/zowe-explorer-api/package.json +++ b/packages/zowe-explorer-api/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zowe-explorer-api", - "version": "2.11.0-SNAPSHOT", + "version": "2.11.0", "description": "Extensibility API for Zowe Explorer.", "publisher": "Zowe", "author": "Zowe", diff --git a/packages/zowe-explorer-ftp-extension/CHANGELOG.md b/packages/zowe-explorer-ftp-extension/CHANGELOG.md index 54a1c064d4..e5d8364039 100644 --- a/packages/zowe-explorer-ftp-extension/CHANGELOG.md +++ b/packages/zowe-explorer-ftp-extension/CHANGELOG.md @@ -1,6 +1,6 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be documented in this file. -## TBD Release +## `2.11.0` ### Bug fixes diff --git a/packages/zowe-explorer-ftp-extension/package.json b/packages/zowe-explorer-ftp-extension/package.json index 39d49e53ad..8271717e7d 100644 --- a/packages/zowe-explorer-ftp-extension/package.json +++ b/packages/zowe-explorer-ftp-extension/package.json @@ -5,7 +5,7 @@ "author": "Zowe", "license": "EPL-2.0", "description": "Adds zFTP support to Zowe Explorer demonstrating how to extend the Zowe Explorer using its extensibility API.", - "version": "2.11.0-SNAPSHOT", + "version": "2.11.0", "icon": "resources/zowe-ftp-color.png", "repository": { "url": "https://github.com/zowe/vscode-extension-for-zowe" @@ -48,7 +48,7 @@ }, "dependencies": { "@zowe/zos-ftp-for-zowe-cli": "2.1.2", - "@zowe/zowe-explorer-api": "2.11.0-SNAPSHOT", + "@zowe/zowe-explorer-api": "2.11.0", "tmp": "0.2.1" }, "devDependencies": { diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index 1b5a5e1627..46b8e7b807 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documented in this file. -## TBD Release +## `2.11.0` ### New features and enhancements diff --git a/packages/zowe-explorer/package.json b/packages/zowe-explorer/package.json index 0de5da53c0..46ff576925 100644 --- a/packages/zowe-explorer/package.json +++ b/packages/zowe-explorer/package.json @@ -2,7 +2,7 @@ "name": "vscode-extension-for-zowe", "displayName": "%displayName%", "description": "%description%", - "version": "2.11.0-SNAPSHOT", + "version": "2.11.0", "publisher": "Zowe", "author": "Zowe", "license": "EPL-2.0", @@ -1966,7 +1966,7 @@ "copy-webpack-plugin": "^6.4.1", "cross-env": "^5.2.0", "del": "^4.1.1", - "eslint-plugin-zowe-explorer": "2.11.0-SNAPSHOT", + "eslint-plugin-zowe-explorer": "2.11.0", "event-stream": "^4.0.1", "expect": "^24.8.0", "geckodriver": "^1.19.1", @@ -1992,7 +1992,7 @@ }, "dependencies": { "@zowe/secrets-for-zowe-sdk": "7.18.4", - "@zowe/zowe-explorer-api": "2.11.0-SNAPSHOT", + "@zowe/zowe-explorer-api": "2.11.0", "fs-extra": "8.0.1", "isbinaryfile": "4.0.4", "js-yaml": "3.13.1", diff --git a/packages/zowe-explorer/webviews/edit-attributes/package.json b/packages/zowe-explorer/webviews/edit-attributes/package.json index 1bedd9b14c..e2213e7467 100644 --- a/packages/zowe-explorer/webviews/edit-attributes/package.json +++ b/packages/zowe-explorer/webviews/edit-attributes/package.json @@ -2,7 +2,7 @@ "name": "edit-attributes", "private": true, "type": "module", - "version": "2.10.0-SNAPSHOT", + "version": "2.11.0", "main": "index.js", "license": "EPL-2.0", "scripts": { From 427dd02f5d972b72c4a21550219e71874c0eaf41 Mon Sep 17 00:00:00 2001 From: zowe-robot Date: Fri, 15 Sep 2023 18:55:57 +0000 Subject: [PATCH 12/12] Bump version to 2.12.0-SNAPSHOT [ci skip] Signed-off-by: zowe-robot --- lerna.json | 2 +- packages/eslint-plugin-zowe-explorer/CHANGELOG.md | 6 ++++++ packages/eslint-plugin-zowe-explorer/package.json | 2 +- packages/zowe-explorer-api/CHANGELOG.md | 6 ++++++ packages/zowe-explorer-api/package.json | 2 +- packages/zowe-explorer-ftp-extension/CHANGELOG.md | 6 ++++++ packages/zowe-explorer-ftp-extension/package.json | 4 ++-- packages/zowe-explorer/CHANGELOG.md | 6 ++++++ packages/zowe-explorer/package.json | 6 +++--- .../zowe-explorer/webviews/edit-attributes/package.json | 2 +- 10 files changed, 33 insertions(+), 9 deletions(-) diff --git a/lerna.json b/lerna.json index e49531594a..c6e4b4889b 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.11.0", + "version": "2.12.0-SNAPSHOT", "command": { "version": { "forcePublish": true, diff --git a/packages/eslint-plugin-zowe-explorer/CHANGELOG.md b/packages/eslint-plugin-zowe-explorer/CHANGELOG.md index e9fed4e69b..60068cda3a 100644 --- a/packages/eslint-plugin-zowe-explorer/CHANGELOG.md +++ b/packages/eslint-plugin-zowe-explorer/CHANGELOG.md @@ -1,5 +1,11 @@ All notable changes to the "eslint-plugin-zowe-explorer" package will be documented in this file. +## TBD Release + +### New features and enhancements + +### Bug fixes + ## `2.11.0` ### New features and enhancements diff --git a/packages/eslint-plugin-zowe-explorer/package.json b/packages/eslint-plugin-zowe-explorer/package.json index 2a3d9097b7..5f07b57d56 100644 --- a/packages/eslint-plugin-zowe-explorer/package.json +++ b/packages/eslint-plugin-zowe-explorer/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-zowe-explorer", - "version": "2.11.0", + "version": "2.12.0-SNAPSHOT", "description": "Custom ESLint Rules for ZOWE Explorer", "keywords": [ "eslint", diff --git a/packages/zowe-explorer-api/CHANGELOG.md b/packages/zowe-explorer-api/CHANGELOG.md index 6f5794ea7a..f3d025e88f 100644 --- a/packages/zowe-explorer-api/CHANGELOG.md +++ b/packages/zowe-explorer-api/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to the "zowe-explorer-api" extension will be documented in this file. +## TBD Release + +### New features and enhancements + +### Bug fixes + ## `2.11.0` ### New features and enhancements diff --git a/packages/zowe-explorer-api/package.json b/packages/zowe-explorer-api/package.json index 4f6509ac85..9db6de5187 100644 --- a/packages/zowe-explorer-api/package.json +++ b/packages/zowe-explorer-api/package.json @@ -1,6 +1,6 @@ { "name": "@zowe/zowe-explorer-api", - "version": "2.11.0", + "version": "2.12.0-SNAPSHOT", "description": "Extensibility API for Zowe Explorer.", "publisher": "Zowe", "author": "Zowe", diff --git a/packages/zowe-explorer-ftp-extension/CHANGELOG.md b/packages/zowe-explorer-ftp-extension/CHANGELOG.md index e5d8364039..955460b2a1 100644 --- a/packages/zowe-explorer-ftp-extension/CHANGELOG.md +++ b/packages/zowe-explorer-ftp-extension/CHANGELOG.md @@ -1,5 +1,11 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be documented in this file. +## TBD Release + +### New features and enhancements + +### Bug fixes + ## `2.11.0` ### Bug fixes diff --git a/packages/zowe-explorer-ftp-extension/package.json b/packages/zowe-explorer-ftp-extension/package.json index 8271717e7d..db66761841 100644 --- a/packages/zowe-explorer-ftp-extension/package.json +++ b/packages/zowe-explorer-ftp-extension/package.json @@ -5,7 +5,7 @@ "author": "Zowe", "license": "EPL-2.0", "description": "Adds zFTP support to Zowe Explorer demonstrating how to extend the Zowe Explorer using its extensibility API.", - "version": "2.11.0", + "version": "2.12.0-SNAPSHOT", "icon": "resources/zowe-ftp-color.png", "repository": { "url": "https://github.com/zowe/vscode-extension-for-zowe" @@ -48,7 +48,7 @@ }, "dependencies": { "@zowe/zos-ftp-for-zowe-cli": "2.1.2", - "@zowe/zowe-explorer-api": "2.11.0", + "@zowe/zowe-explorer-api": "2.12.0-SNAPSHOT", "tmp": "0.2.1" }, "devDependencies": { diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index 46b8e7b807..e91bf6ae2b 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documented in this file. +## TBD Release + +### New features and enhancements + +### Bug fixes + ## `2.11.0` ### New features and enhancements diff --git a/packages/zowe-explorer/package.json b/packages/zowe-explorer/package.json index 46ff576925..c999eba9aa 100644 --- a/packages/zowe-explorer/package.json +++ b/packages/zowe-explorer/package.json @@ -2,7 +2,7 @@ "name": "vscode-extension-for-zowe", "displayName": "%displayName%", "description": "%description%", - "version": "2.11.0", + "version": "2.12.0-SNAPSHOT", "publisher": "Zowe", "author": "Zowe", "license": "EPL-2.0", @@ -1966,7 +1966,7 @@ "copy-webpack-plugin": "^6.4.1", "cross-env": "^5.2.0", "del": "^4.1.1", - "eslint-plugin-zowe-explorer": "2.11.0", + "eslint-plugin-zowe-explorer": "2.12.0-SNAPSHOT", "event-stream": "^4.0.1", "expect": "^24.8.0", "geckodriver": "^1.19.1", @@ -1992,7 +1992,7 @@ }, "dependencies": { "@zowe/secrets-for-zowe-sdk": "7.18.4", - "@zowe/zowe-explorer-api": "2.11.0", + "@zowe/zowe-explorer-api": "2.12.0-SNAPSHOT", "fs-extra": "8.0.1", "isbinaryfile": "4.0.4", "js-yaml": "3.13.1", diff --git a/packages/zowe-explorer/webviews/edit-attributes/package.json b/packages/zowe-explorer/webviews/edit-attributes/package.json index e2213e7467..f26f971a75 100644 --- a/packages/zowe-explorer/webviews/edit-attributes/package.json +++ b/packages/zowe-explorer/webviews/edit-attributes/package.json @@ -2,7 +2,7 @@ "name": "edit-attributes", "private": true, "type": "module", - "version": "2.11.0", + "version": "2.12.0-SNAPSHOT", "main": "index.js", "license": "EPL-2.0", "scripts": {