Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Cases] RBAC on UI #99478
[Cases] RBAC on UI #99478
Changes from 5 commits
8e33930
cb62698
242f608
3b93743
240e17b
9fc4772
5fd963f
c680d71
2439361
defa361
29068cb
12ac71d
9973648
5acfe99
11f48b2
935e255
3b4634e
11b01b0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
@jonathan-buttner @michaelolo24 Do you think is best for the
useGetCases
hook to useuseOwnerContext
instead of passing it as an argument?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.
If you'll never call
useGetCases
without the context owner, then I say include it in the actualuseGetCases
call rather than passing it in, but if for some reason theowner
can change from call to call, then pass it. There may be reasons I'm not thinking of, but that's how I work it out in my headThere 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.
Kind of the same thing here. I figure when you're in a solution, everything listed here, but the owner will actually be modifiable by the user. You can just skip passing it through here and call it directly in the
useGetTags
anduseGetReporters
callsThere 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.
Is there any chance
owner
could be empty? Or is it guaranteed to be populated with at least one value as part of the react context?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.
You are right about it. I had that debate with myself. After some thought, I decided to do it as
9fc4772
(#99478). If the array is empty when using the context an error will be thrown.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.
When cases have their own UI then we should reconsider what it means to have an empty owner.
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.
Just curious. What's the issue here?
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.
Case as a connector isn't supported yet (the sub cases feature). I think this TODO is stating that we don't have a configurable way to pass
owner
to this component yet. Below we're hardcoding it to the security solution but if we support case as a connector in other plugins (observability) we'll need to allow theowner
to be passed in like the other case components.