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
[ResponseOps][Cases] User suggestion API #137346
[ResponseOps][Cases] User suggestion API #137346
Changes from 6 commits
d154018
cc027f6
04fa120
f11f134
b50935c
1f7e8ef
2901194
f7effe8
3b3e9a8
0068048
9ec9d21
0add79c
57f7cad
c4f53c9
9e7f176
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.
question: I remember you were considering making
security
as a required dependency, is there any reason you decided not to do that?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.
Yeah I found that the security plugin can still be disabled. The functionality to disable it was moved into Elasticsearch. When we initially developed the cases RBAC we intentionally allowed the security plugin to be disabled. It was something that Larry suggested we support. So I didn't want to deviate from that in this PR. I think some users want to play around with Kibana without security enable and it'd be nice for them to still have access to cases in that situation.
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.
Yeah, but you'll still get security contract even if Security is disabled in Elasticsearch and can replace
securityPluginStart?: SecurityPluginStart;
withsecurityPluginStart: SecurityPluginStart;
to have less "undefined" checks (since you need to rely on the availabilty of the security feature via license check anyway). But it's minor, just wanted to point this out.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.
ah ok, good to know. I'll create an issue to fix that up
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.
#137861
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: would be a little bit more readable (requires
import type { UserProfile } from '@kbn/security-plugin/common';
)Alternatively you can change line 65 to
return [] as UserProfile[];
and remove return type signature completely since it can be inferred automatically, up to you.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.
note to myself: we need to expose
license
on thestart
contract too so that you can rely just on a single contract.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.
optional nit:
join(',')
is actually done automatically when array is used in the template string, we usually usejoin
explicitly only if we want another separator (e.g. comma + space).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.
question: would you mind adding a JSDoc here explaining what privileges exactly we'd like potential assignees to have and why (who\what are these owners and why having only
getCase
isn't enough to be assigned to the case)? It'd help other Cases-noobs like me to quickly understand the "privilege model" here 🙂