Skip to content

Comment|DowntimeDetail: Use correct filter for removal#1246

Merged
nilmerg merged 1 commit into
mainfrom
fix/single-comment-and-downtime-removal-broken-1245
Jul 14, 2025
Merged

Comment|DowntimeDetail: Use correct filter for removal#1246
nilmerg merged 1 commit into
mainfrom
fix/single-comment-and-downtime-removal-broken-1245

Conversation

@nilmerg
Copy link
Copy Markdown
Member

@nilmerg nilmerg commented Jul 9, 2025

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

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
@nilmerg nilmerg added this to the 1.2.2 milestone Jul 9, 2025
@nilmerg nilmerg requested a review from sukhwinder33445 July 9, 2025 10:15
@nilmerg nilmerg self-assigned this Jul 9, 2025
@nilmerg nilmerg added bug Something isn't working area/access-control Affects the authorization of users labels Jul 9, 2025
@cla-bot cla-bot Bot added the cla/signed CLA is signed by all contributors of a PR label Jul 9, 2025
@nilmerg
Copy link
Copy Markdown
Member Author

nilmerg commented Jul 9, 2025

@sukhwinder33445 Note that you need to be restricted to reproduce the issue.

@nilmerg nilmerg merged commit 67baaf5 into main Jul 14, 2025
10 checks passed
@nilmerg nilmerg deleted the fix/single-comment-and-downtime-removal-broken-1245 branch July 14, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/access-control Affects the authorization of users bug Something isn't working cla/signed CLA is signed by all contributors of a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to delete downtimes despite existing permissions

2 participants