-
Notifications
You must be signed in to change notification settings - Fork 502
Connection sharing #19542
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?
Connection sharing #19542
Conversation
β¦ng SQL Server connections
β¦management - Added commands for connection sharing: getConnectionIdForActiveEditor, connect, disconnect, isConnected, executeSimpleQuery, getServerInfo, and editConnectionSharingPermissions. - Updated connection sharing approval logic to handle denied status. - Introduced method to retrieve connection info from a given file URI in ConnectionManager. - Modified type definitions for connect and getServerInfo methods to return promises and appropriate types.
- Created a new VS Code extension for connection sharing. - Added package.json to define extension metadata and commands. - Implemented the main extension logic in src/extension.ts, including a command to execute a simple query. - Added TypeScript configuration in tsconfig.json for strict type-checking. - Included a test suite in src/test/extension.test.ts with a sample test case. - Updated connectionSharingService.ts to handle new permission options including "Clear" for resetting approvals. - Enhanced user prompts for connection sharing permissions with current status indicators.
β¦and enhance connection sharing service
β¦ods and localized strings
β¦eporting instructions
PR Changes
|
Good day @aasimkhan30 ! In continue of #19456 Could we add a function to API - something like scriptObject, pass object name (table name, stored procedure, function etc.) and ScriptOperation (select, create, insert, update, delete, execute, alter) and get result script in string back? Thanks! |
β¦sharing service
β¦thod and update tests
|
||
2. Open this sample extension in VS Code | ||
3. In the Run and Debug view, select the "Run Extension" configuration | ||
4. It should launch a new VS Code window with the extension activated |
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.
Aren't these the normal instructions for running the MSSQL extension? Does anything need to be changed here for connection-sharing-sample
?
@@ -0,0 +1,48 @@ | |||
# Welcome to your VS Code Extension |
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.
Update or remove this file
Pull Request Template β vscode-mssql
Description
PR Description
Fixes #19456
This PR adds support for managing third-party extension access to MSSQL connections through a permission-based model.
π Permission Request Flow
When a new extension requests access to MSSQL connections, users will see a prompt like the one below:

Upon approval, the extension gains the ability to:
βοΈ Managing Permissions
Users can manage permissions through the "Edit Permissions" command:
Run the Edit Permissions command

Select the extension for which you want to manage access

Modify the permissions granted to that extension

π§Ή Clearing All Permissions
Users can also reset all granted permissions via the "Clear All Permissions" command:
Run the command

A confirmation dialog will appear to prevent accidental revocation

Code Changes Checklist
npm run test
)Reviewers: Please read our reviewer guidelines