Skip to content

Allow for asking for all ancestor grants via the field mask - #867

Merged
aduffeck merged 3 commits into
opencloud-eu:mainfrom
aduffeck:ancestor-grants
Oct 9, 2026
Merged

aduffeck merged 3 commits into
opencloud-eu:mainfrom
aduffeck:ancestor-grants

Conversation

@aduffeck

@aduffeck aduffeck commented Oct 9, 2026

Copy link
Copy Markdown
Member

It is now possible to retrieve the list of all grants on the node and any of its parents when converting the node to a resource info. The list is compiled with another loop of the ancestors, but it's within the same call and the metadata is usually cached from the permission loop so it's cheap.

It is now possible to retrieve the list of all grants on the node and
any of its parents when converting the node to a resource info.
The list is compiled with another loop of the ancestors, but it's within
the same call and the metadata is usually cached from the permission
loop so it's cheap.

@maki5 maki5 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

overall lgtm, just one small comment

Comment thread pkg/utils/utils.go Outdated
o = ensureOpaque(o)

// grantees are oneofs, which only protojson can marshal
b, _ := MarshalProtoV1ToJSON(&provider.ListGrantsResponse{Grants: grants})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

we are ignoring the error intentionally here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

👍 you're right, we shouldn't silently drop those. Fixed with the last commit.

@aduffeck
aduffeck merged commit 34c9b68 into opencloud-eu:main Oct 9, 2026
18 of 19 checks passed
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