Skip to content
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

Extends 'spo sp grant revoke' with scope. Closes #5604 #5605

Conversation

waldekmastykarz
Copy link
Member

Extends 'spo sp grant revoke' with scope. Closes #5604

@Jwaegebaert Jwaegebaert self-assigned this Nov 23, 2023
Copy link
Contributor

@Jwaegebaert Jwaegebaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@waldekmastykarz nice job, nothing else to add besides some spacing! Will merge it soon


`-s, --scope [scope]`
: Scope to revoke. If not specified, will revoke all permissions.
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```
```

if (response.ErrorInfo) {
throw response.ErrorInfo.ErrorMessage;
const json: ClientSvcResponse = JSON.parse(res);
const response: ClientSvcResponseContents = json[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const response: ClientSvcResponseContents = json[0];
const response: ClientSvcResponseContents = json[0];

const grantRequestRes = await request.post<string>(getGrantRequestOptions);
const grantRequestJson: ClientSvcResponse = JSON.parse(grantRequestRes);
const responseInfo: ClientSvcResponseContents = grantRequestJson[0];
if (responseInfo.ErrorInfo) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (responseInfo.ErrorInfo) {
if (responseInfo.ErrorInfo) {


const removeScopeResJson: ClientSvcResponse = JSON.parse(removeScopeRes);
const removeScopeResponse: ClientSvcResponseContents = removeScopeResJson[0];
if (removeScopeResponse.ErrorInfo) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (removeScopeResponse.ErrorInfo) {
if (removeScopeResponse.ErrorInfo) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend spo sp grant revoke with scope
2 participants