- 
                Notifications
    You must be signed in to change notification settings 
- Fork 106
Preventing Same-DASD & Same-DSN Drag-and-Drop #3827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Amber <[email protected]>
Signed-off-by: Amber <[email protected]>
Signed-off-by: Amber <[email protected]>
| @ATorrise suggestion for the message is below. Lmk if you have any thoughts on this. Cannot move: The source and target are the same. You are using a different profile to view the target. Refresh to view changes. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some suggestions for the changelog entry and the user message.
| if (targetSys == sourceSys) { | ||
| await Gui.errorMessage( | ||
| vscode.l10n.t( | ||
| "Cannot move: the source and target are the same dataset on the same system. You're viewing it under a different profile. Any changes you need to view with target profile can be seen via a refresh." | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested message:
Cannot move: The source and target are the same. You are using a different profile to view the target. Refresh to view changes.
Co-authored-by: anaxceron <[email protected]> Signed-off-by: Amber Torrise <[email protected]>
Signed-off-by: Amber Torrise <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 😋
This should work in most scenarios. However, we should warn the users about some of the edge cases.
Signed-off-by: Amber <[email protected]>
Signed-off-by: Amber <[email protected]>
Signed-off-by: Amber <[email protected]>
| Codecov Report❌ Patch coverage is  Additional details and impacted files@@            Coverage Diff             @@
##             main    #3827      +/-   ##
==========================================
- Coverage   94.00%   93.95%   -0.05%     
==========================================
  Files         129      129              
  Lines       15472    15510      +38     
  Branches     3732     3592     -140     
==========================================
+ Hits        14545    14573      +28     
- Misses        925      935      +10     
  Partials        2        2              ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
Signed-off-by: Amber <[email protected]>
Signed-off-by: Amber <[email protected]>
Signed-off-by: Amber <[email protected]>
Signed-off-by: Amber <[email protected]>
Signed-off-by: Amber <[email protected]>
Signed-off-by: Amber <[email protected]>
Signed-off-by: Amber <[email protected]>
Proposed changes
When two profiles point to the same shared storage but use different authentication methods (ie basic auth vs. APIML) the Zowe's VSCE previously allowed a drag-and-drop that looked like a cross-LPAR move.
This results in confusing behavior and can lead to accidental deletion even though the source and target were actually the same object. In reality no move is necessary and should be prevented.
This change adds explicit detection of “same-object” situations in both Dataset and USS trees and blocks the drop operation.
If a blocked condition is detected:
How to Test
Situations to test:
Release Notes
Changelog:
Bug Fix – Prevent drag-and-drop between profiles when the source and target resolve to the same object (same DSN on same DASD for MVS, or same path for USS). The operation is now blocked and an explanatory error is shown. Users should Refresh the target profile to see changes.
Types of changes
Checklist
General
yarn workspace vscode-extension-for-zowe vscode:prepublishpnpm --filter vscode-extension-for-zowe vscode:prepublishCode coverage
Deployment