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

Fix: Invalid Cmdlet used for checking if commands can be executed #7

Merged
merged 1 commit into from
Jun 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions doc/31-Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Please read the [upgrading](30-Upgrading-API-Checks.md) documentation before upg

Released closed milestones can be found on [GitHub](https://github.com/Icinga/icinga-powershell-apichecks/milestones?state=closed).

## 1.2.0 (2021-03-02)

[Issue and PRs](https://github.com/Icinga/icinga-powershell-apichecks/milestone/3?closed=1)

### Bugfixes

* [#7](https://github.com/Icinga/icinga-powershell-apichecks/pull/7) The Cmdlet being used to test if certain commands can be executed or not, was wrong and has been replaced, which will now cause an exception for the REST-Api daemon.

## 1.1.0 (2021-03-02)

[Issue and PRs](https://github.com/Icinga/icinga-powershell-apichecks/milestone/2?closed=1)
Expand Down
2 changes: 1 addition & 1 deletion lib/Invoke-IcingaApiChecksRESTCall.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function Invoke-IcingaApiChecksRESTCall()
[string]$ExecuteCommand = $Request.RequestArguments.command;
}

if ((Test-IcingaFrameworkApiCommand -Command $ExecuteCommand -Endpoint 'apichecks') -eq $FALSE) {
if ((Test-IcingaRESTApiCommand -Command $ExecuteCommand -Endpoint 'apichecks') -eq $FALSE) {
Send-IcingaTCPClientMessage -Message (
New-IcingaTCPClientRESTMessage `
-HTTPResponse ($IcingaHTTPEnums.HTTPResponseType.'Forbidden') `
Expand Down