Skip to content

Conversation

jiparis
Copy link
Member

@jiparis jiparis commented Jun 26, 2025

Fix filtering by visible referrers in Discover endpoints. Since this endpoint search in multiple orgs, the logic must consider the user role in each of those orgs to apply RBAC on projects if needed.

  • if the user doesn't need RBAC in some Organization, the resource is visible
  • if the user is "member" in all organizations, RBAC is applied by checking visible projects on each (if the resource is accessible in one of them, it's returned).

Refs #2121

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis requested review from migmartri and javirln June 26, 2025 15:11
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@migmartri
Copy link
Member

if the user is "member" in all organizations, RBAC is applied by checking visible projects on each (if the resource is accessible in one of them, it's returned).

I do not follow this logic, could you elaborate?

Copy link
Member

@migmartri migmartri left a comment

Choose a reason for hiding this comment

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

I still struggle with this a little bit. I do not understand how you can do a multi-dymension query between orgs that include all the projects, and orgs that include only some.

jiparis added 2 commits June 27, 2025 12:53
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis merged commit 96bbf57 into chainloop-dev:main Jun 27, 2025
13 checks passed
@jiparis jiparis deleted the PFM-3218 branch June 27, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants