Skip to content

Commit

Permalink
fix: improved handling when the User you are connecting to Nexus Life…
Browse files Browse the repository at this point in the history
…cycle does not have enough permissions + updated docs (#243)

Signed-off-by: Paul Horton <[email protected]>
  • Loading branch information
madpah authored Feb 23, 2023
1 parent 4d89910 commit 9cb94a5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Configuration can be done in VSCode's extension settings: `Preferences > Setting

### AdHoc Commercial Settings

If you are a commercial Sonatype IQ user, switch the data source to `iqServer` and enter your IQ endpoint and credentials. You can enter your password which will be stored in cleartext, or you can leave this blank and be prompted for a password on start-up:
If you are a commercial Sonatype Nexus Lifecycle user, switch the data source to `iqServer` and enter your IQ endpoint and credentials. You can enter your password which will be stored in cleartext, or you can leave this blank and be prompted for a password on start-up:

![VSCode Settings](https://github.com/sonatype-nexus-community/vscode-iq-plugin/raw/main/media/iqserver-passwordprompt-dark.png)

Expand Down Expand Up @@ -93,6 +93,12 @@ You can add a `.sonatype-config` file (`.sonatype-config.yaml` and `.sonatype-co

`IncludeDev` can be set to `false` to exclude dependencies declared as Developement-only dependencies - note that not all ecosystems have this distinction.

## Nexus Lifecycle Permissions

The user you use to connect to your Nexus Lifecycle server must hold at least the Application Evaluator role for the Application in question. If not, you will see a warning letting you know you don't have the right permissions.

![Nexus IQ Insufficient Permissions Screenshot](https://github.com/sonatype-nexus-community/vscode-iq-plugin/raw/main/media/iq-insufficient-permissions.png)

## Workspace Support with Multiple Projects

Starting in version 1.1.0, we now support [VS Code multi-root Workspaces](https://code.visualstudio.com/docs/editor/workspaces) that contain multiple Applications. Specifcally, this allows a Workspace to contain mulitple folders, where each folder is an Application (in Nexus IQ parlance).
Expand Down
6 changes: 5 additions & 1 deletion ext-src/models/IqMultiProjectComponentModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,11 @@ export class IqMultiProjectComponentModel implements ComponentModel {
},
(failure) => {
this.logger.log(LogLevel.ERROR, `Nexus IQ extension failure`, failure);
window.showErrorMessage(`Nexus IQ extension failure: ${failure}`);
if (failure == 403) {
window.showErrorMessage('Nexus IQ extension: Insufficient Permissions (403) - do you hold the Application Evaluator role for your Application?')
} else {
window.showErrorMessage(`Nexus IQ extension failure: ${failure}`);
}
});
})

Expand Down
Binary file added media/iq-insufficient-permissions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9cb94a5

Please sign in to comment.