-
Notifications
You must be signed in to change notification settings - Fork 23
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
[feature] - search multitenant workflow run search in parent org #145
Conversation
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.
Nice
} | ||
|
||
// Limit to max 50 suborgs | ||
if len(suborgs) > 50 { |
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.
Minor unimportant optimization: Shouldn't the check for the user existing in an org happen earlier? Inside the goroutine is "efficient", but it can randomly turn into search e.g. 27 orgs instead of 50, as the cleanup happens before we check if they should be able to see it.
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.
true, I will update that check.
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.
Update code in this commit: 42ce125
@@ -28483,6 +28483,104 @@ func HandleWorkflowRunSearch(resp http.ResponseWriter, request *http.Request) { | |||
Cursor: cursor, | |||
} | |||
|
|||
//Get workflow run for all subgs of current org where the user is a member | |||
if search.SuborgRuns == true { |
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.
What happens if the search is specifically for a single workflow? Do we just remove the filter?
I'm aware we said we would wait with this, but the if statement needs to at least take it into account as to not "randomly" add a bunch of suborg workflows.
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.
Yes, when suborg workflow run search is one and if user select any specific workflow to search than it clear filter for suborg and then only search for that workflow
No description provided.