* Auth: Add method `assertColumnRestrictions`
* ObjectSuggestions: Do not suggest protected variables
`assertColumnRestrictions` does not allow to use them
anymore, hence we should not suggest them in searches
as well to not to let the user run into an error by
accepting a suggestion. Though, when fetching values
as well, we still have to obfuscate, otherwise protected
vars won't show up in details anymore.
* Introduce Icinga\Module\Icingadb\Common\Model
Must be used as base for all models, to ensure
column restrictions are asserted on filters.
* Utilize `Icinga\Module\Icingadb\Common\Model` where applicable
If the problem toggle is created after the params are shifted, it
redirects to the page without them. To solve this I simply moved
the problem toggle before shifting the params.
The HTTP API documentation omits the fact, that the HTTP method `POST`
is required
for all endpoints which change things.
This PR aims to mention that explicitely to ease API adaption.
Since #1060, comments/delete and downtimes/delete try to use
`ObjectAuthorization`'s cache properly and override `CommandAction`'s
`isGrantedOnType()`. Though, the filter is applied to the host
and service model as a result, and not to the downtime model. This
way, downtime filters MUST be absolute, just like filters provided
by the search bar. Otherwise `name=downtime-name` will be translated
to e.g. `host.name=downtime-name` which obviously cannot match.
fixes#1245
There are multiple possible outputs for an Icinga DB version. The
package version contain the git tag, with a leading "v". The development
version mimics git-describe(1), including a commit hash separated by a
dash after the semantic version.
The current version comparison uses PHP's builtin version_compare().
This results in leading "v"s to return invalid results. Furthermore, it
treats everything behind the version as an "any string"[^0], which is
smaller than dev, alpha, beta, and so on. Thus, any git-describe(1)
version of Icinga DB 1.4.0 would be considered smaller as 1.4.0.
Fixes#1230.
[^0]: https://www.php.net/manual/en/function.version-compare.php
The old redis schema is incompatible with v1.2.0 hence the
health check should report a critical incident instead.
Also updates the health view to show a proper message.
* RedundancyGroupSummary:
- Columns are same as in DependencyNodeSummary. Column `redundancy_group.state.failed` excluded because not required here.
- Don't sort by default. Sorting the summary is not necessary and even fails for PostgreSQL as it would require adding the column to the GROUP BY clause.
- Introduce new method for(), to easily get the summary query for given group id. Adjust filter. The summary is always for parent (member).