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

Image database methods should not resolve the effective project #13896

Open
markylaing opened this issue Aug 8, 2024 · 0 comments
Open

Image database methods should not resolve the effective project #13896

markylaing opened this issue Aug 8, 2024 · 0 comments
Assignees
Labels
Improvement Improve to current situation
Milestone

Comments

@markylaing
Copy link
Contributor

While working on #13886, I added an extra query to many image and image alias endpoints to resolve the effective project for images, as required for authorization checks.

For all other entity types with a features.{entity_type} project configuration, a helper function exists in the project package to resolve the effective project. This is set in the request context and used in database queries. However, the image database queries expect the request project, and resolve the effective project as part of the query. This is no longer necessary.

Additionally, some methods seem redundant (GetImage appears to just call GetImageByFingerprintPrefix).

We should revisit some of these methods and clean them up.

@markylaing markylaing self-assigned this Aug 8, 2024
@tomponline tomponline added the Improvement Improve to current situation label Aug 9, 2024
@tomponline tomponline added this to the lxd-6.2 milestone Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Improve to current situation
Projects
None yet
Development

No branches or pull requests

2 participants