mirror of
https://github.com/moghtech/komodo.git
synced 2026-05-21 07:11:29 -05:00
[PR #1179] [CLOSED] fix: filter build update logs by user resource permissions #12893
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/moghtech/komodo/pull/1179
Author: @litlmike
Created: 2/8/2026
Status: ❌ Closed
Base:
main← Head:fix-issue-1011📝 Commits (1)
6fc412dfix: filter build update logs by user resource permissions📊 Changes
1 file changed (+13 additions, -4 deletions)
View changed files
📝
bin/core/src/api/read/update.rs(+13 -4)📄 Description
Problem
Non-admin users see Run Build update logs from other deployments in the Updates window (issue #1011).
Root Cause
In
ListUpdates, when a non-admin user's query contains a$orfilter (e.g., when viewing a deployment page that shows associated build updates), the permission filter's$oroverwrites the user's$orviaDocument::extend(). This causes the user's resource-specific filter to be lost, showing all updates the user has permission on rather than the filtered subset.For example, when viewing a deployment page:
{ $or: [deployment_filter, build_filter] }query.extend(doc! { $or: [permission_filters] })$orreplaces the user's$orFix
Use
$andto combine the user query with the permission filter, preserving both constraints:Fixes #1011
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.