-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix resource access requests for apps #13955
Conversation
lib/services/access_request.go
Outdated
|
||
// namesMatcher returns a PredicateExpression which matches any of a given list | ||
// of names. Given names will be escaped and quoted when building the expression. | ||
func namesMatcher(names []string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I'd change the name to namesOrMatcher
to indicate that the final expression uses the ||
operator. Feel free to leave as it is if you think that the comment is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with anyNameMatcher
so it doesn't sound like it might return some names OR a matcher 🤷♂️
@nklaassen See the table below for backport results.
|
Resource access requests for apps are currently broken for static apps because I incorrectly assumed they would be returned from calls to
GetApp
, which is not the case.The change here is to use
ListResources
instead ofGetApp
,GetNode
, etc... inPruneResourceRequestRoles
. This is more consistent with the way we search for resources and build the access request in the first place withtsh request search
and from the web UI, whereListResources
is already used.