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

Bug report: 'spo commandset remove' does not work as expected #4706

Closed
martinlingstuyl opened this issue Mar 31, 2023 · 0 comments
Closed

Bug report: 'spo commandset remove' does not work as expected #4706

martinlingstuyl opened this issue Mar 31, 2023 · 0 comments
Assignees
Milestone

Comments

@martinlingstuyl
Copy link
Contributor

martinlingstuyl commented Mar 31, 2023

There are a number of issues with the command spo commandset remove

  • According to the issue specs and the documentation, the default scope option value should be All, meaning that the command will look in all scopes (Site and Web) to find the customaction to delete. However, the default scope in the code is Site.
  • If you specify scope All manually, the command throws. This is because the code is just adding this to the customaction url, while deleting: /_api/All/UserCustomActions. However, this should not be possible, All is our convention, not a valid scope.

To solve these issues a few steps need to be taken:

  • Always find the customaction first, using the spo util functions, also when the --id property is used.
  • Use the scope value of the found customaction in the DELETE HTTP request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants