-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Merged
Merged
[Cases] RBAC on UI #99478
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
8e33930
Pass onwer to create form
cnasikas cb62698
Pass owner to get cases
cnasikas 242f608
Pass owner to tags and reporters
cnasikas 3b93743
Pass owner to configuration
cnasikas 240e17b
Use owner context
cnasikas 9fc4772
Throw an error if owner context is not set
cnasikas 5fd963f
Add owner provider to case view
cnasikas c680d71
Use APP_ID when attaching an alert to a case
cnasikas 2439361
Clean up TODOs
cnasikas defa361
Merge branch 'cases-rbac-poc' into ui_rbac
kibanamachine 29068cb
Use constants for owner
cnasikas 12ac71d
Fix tests
cnasikas 9973648
Move owner to child
cnasikas 5acfe99
Fix type
cnasikas 11f48b2
Move owner inside the hooks & components
cnasikas 935e255
Fix bug
cnasikas 3b4634e
Fix types
cnasikas 11b01b0
Fix tests
cnasikas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ const defaultInitial = { | |
reporters: [], | ||
status: StatusAll, | ||
tags: [], | ||
owner: [], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
}; | ||
|
||
const CasesTableFiltersComponent = ({ | ||
|
@@ -63,8 +64,8 @@ const CasesTableFiltersComponent = ({ | |
); | ||
const [search, setSearch] = useState(initial.search); | ||
const [selectedTags, setSelectedTags] = useState(initial.tags); | ||
const { tags, fetchTags } = useGetTags(); | ||
const { reporters, respReporters, fetchReporters } = useGetReporters(); | ||
const { tags, fetchTags } = useGetTags(initial.owner); | ||
const { reporters, respReporters, fetchReporters } = useGetReporters(initial.owner); | ||
|
||
const refetch = useCallback(() => { | ||
fetchTags(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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 head