Skip to content

Builds: healthcheck permissions #12423

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

humitos
Copy link
Member

@humitos humitos commented Aug 19, 2025

We want to skip the default permsissions check here (done at get_queryset() method) because it filters the object by build API key and/or user access.

Since we are making an anonymous request without a build API key, we need to skip this check and base it only on the ?builder= GET attribute.

@humitos humitos requested a review from a team as a code owner August 19, 2025 10:58
@humitos humitos requested a review from stsewd August 19, 2025 10:58
We want to skip the default permsissions check here (done at `get_queryset()`
method) because it filters the object by build API key and/or user access.

Since we are making an anonymous request without a build API key, we need to
skip this check and base it only on the `?builder=` GET attribute.
@humitos humitos force-pushed the humitos/healthcheck-api-permissions branch from e82ef87 to d415010 Compare August 19, 2025 11:02
@humitos humitos added the PR: hotfix Pull request applied as hotfix to release label Aug 19, 2025
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have a test

@@ -307,7 +308,12 @@ def concurrent(self, request, **kwargs):
methods=["post"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to just override get_queryset here

        get_queryset=lambda: Build.objects.all(),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: hotfix Pull request applied as hotfix to release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants