-
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
[Spaces] - Space aware privileges UI #21049
Merged
legrego
merged 100 commits into
elastic:spaces-phase-1
from
legrego:space-aware-privileges
Aug 27, 2018
Merged
Changes from 75 commits
Commits
Show all changes
100 commits
Select commit
Hold shift + click to select a range
f208d3c
Crude and incomplete impl of Space-Aware Saved Objects Client
legrego 7538bf3
Code review updates
legrego bb3e511
Missed one - move extraBodyProperties to the top
legrego 0e2e4e8
Remove documentFilter from bulkGet
legrego a6287cc
Merge branch 'spaces-phase-1' into space-aware-saved-objects
legrego 7db0a4a
Make config document id independent of Kibana version
legrego de0adb6
partial impl
legrego 192d9c2
Merge branch 'spaces-phase-1' into space-aware-saved-objects
legrego 1c4afd8
Merge branch 'spaces-phase-1' into space-aware-saved-objects
legrego d573457
cleanup and fixes following initial rbac phase 1 merge
legrego d99cec7
remove unused/migrated files
legrego 7e2d1e3
remove unused code
legrego 862752b
Merge branch 'spaces-phase-1' into space-aware-saved-objects
legrego a63128c
partial updates for space aware saved objects and tests
legrego 858eff0
working get & find functional tests
legrego 1b95aa0
added bulk_get tests
legrego fc663d9
refactor query params into dedicated module
legrego fc61594
additional tests and bugfixes for space aware saved objects
legrego 776da8a
revert changes to ui settings service
legrego d2545d4
additional tests for space-aware saved objects
legrego 1fd7699
Fix navigating to the default space
legrego 9469742
additional unit tests
legrego e24578f
Create default space on startup, *after* ES has gone green
legrego 5fe4bfd
support & testing for bulk_create for space-enabled installations
legrego c6e8925
cleanup and docs
legrego 1bc36c7
Merge branch 'spaces-phase-1' into space-aware-privileges
legrego 0544eb3
Merge branch 'space-aware-saved-objects' into space-aware-privileges
legrego b878051
Merge branch 'spaces-phase-1' into space-aware-privileges
legrego f4a19ab
undo formatting changes
legrego 46e7c71
update for rxjs6 compat
legrego 3220623
experimental WIP for space change callbacks
legrego 392c7ea
start to refactor kibana privileges form
legrego dee335b
only allow filters to be passed to getQueryParams
legrego 452de10
don't add space id when updating within the default space
legrego 6bf3515
renaming files
legrego 8cb871a
additional SOC and repository tests
legrego 53bb020
remove default context from utility functions
legrego 90892ca
rename spacesSavedObjectsClientWrapper => spacesSavedObjectsClientWra…
legrego 4181c9e
don't mutate passed options for SOC create method
legrego a35d15f
allow options to be passed for get and bulkGet
legrego 093dd47
additional review updates
legrego 6e1c4c4
Merge branch 'spaces-phase-1' into space-aware-saved-objects
legrego 2195ee0
consolidate init logic
legrego 48c5f23
Add error handling when switching spaces
legrego 3a832e9
rename single character variables
legrego 71f0634
Merge branch 'spaces-phase-1' into space-aware-saved-objects
legrego ca0b4d0
Merge branch 'space-aware-saved-objects' into space-aware-privileges
legrego a4c1ddb
additional WIP changes
legrego 00bd94c
fix merge
legrego 415fa09
Merge branch 'spaces-phase-1' into space-aware-saved-objects
legrego 8d48c80
Merge branch 'spaces-phase-1' into space-aware-saved-objects
legrego edd1089
update role screen to use new public roles api
legrego 1a65ca9
Merge branch 'spaces-phase-1' into update-roles-screen-spaces
legrego 95ef05c
update spaces and role management to conform to new user management s…
legrego 2461a12
Merge branch 'space-aware-saved-objects' into space-aware-privileges
legrego 79ca48e
Merge branch 'update-roles-screen-spaces' into space-aware-privileges
legrego aaa3ebf
space aware privileges using public roles api
legrego ca4883f
reorganize ES privilege components
legrego 841f9a8
improve prop naming
legrego 4e96943
additional tests
legrego f2e39c1
Merge branch 'spaces-phase-1' into space-aware-privileges
legrego 1527858
Merge branch 'spaces-phase-1' into space-aware-privileges
legrego b9ed305
Merge branch 'spaces-phase-1' into space-aware-privileges
legrego 0ce04ef
Merge branch 'spaces-phase-1' into space-aware-privileges
legrego 5d462e0
improve styling of space selector control
legrego 46d1d22
fix spacing around privilege forms
legrego 08d9096
cleanup and additional testing
legrego 112d992
Design edits (#8)
cchaos 9d0b173
fix tests following design edits
legrego 372e206
Delete index.css
legrego b8f4269
show impacted spaces when base privilege is set to all
legrego 42ba27f
Merge branch 'space-aware-privileges' of github.com:legrego/kibana in…
legrego ab43322
fix action column
legrego 71d5119
show impacted spaces regardless of the minimum permission
legrego 51d83a4
adjust sizing and alignment; bugfix for flyout privileges
legrego 5297bc3
adjust alignment and responsiveness of flex group
legrego b4cbc26
Merge branch 'spaces-phase-1' into space-aware-privileges
legrego a22a638
fix react warning
legrego 482c1e9
show empty index form when role does not include any index privileges
legrego ce635ee
change ES cluster privileges to use a combobox instead of a checkbox …
legrego c325845
Merge branch 'spaces-phase-1' into space-aware-privileges
legrego c9f5824
Merge branch 'spaces-phase-1' into space-aware-privileges
legrego 99376f8
update role management page to use new role api
legrego 8780832
move shared components
legrego d00c5e5
cleanup
legrego dd28bd7
use common 'manage spaces' button
legrego 344cceb
fix broken import reference
legrego 3beaeb8
update security tests to work with updated role management form
legrego ade287d
fix snapshot tests
legrego febbdf5
remove kibana privilege view model
legrego cc1e357
let => const
legrego cba659f
fix displayed space permission when minimum privilege > assigned spac…
legrego aff7d89
reserved state of roles not reflected by screen reader. Fixes #20192
legrego c7b5069
Allow Kibana privileges to be managed if the Spaces plugin is disabled
legrego c8d3045
additional testing and bugfixes
legrego 631463c
add validation to kibana privileges
legrego a3be801
show deleted spaces in the privilege list
legrego 681792d
Merge branch 'spaces-phase-1' into space-aware-privileges
legrego 812652d
fix reference
legrego eea0eb8
TypeScript-ify role management
legrego 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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
120 changes: 120 additions & 0 deletions
120
...it_role/components/privileges/kibana/__snapshots__/privilege_callout_warning.test.js.snap
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 |
---|---|---|
@@ -0,0 +1,120 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`PrivilegeCalloutWarning renders without crashing 1`] = ` | ||
<PrivilegeCalloutWarning | ||
basePrivilege="all" | ||
isReservedRole={false} | ||
role={Object {}} | ||
spaces={Array []} | ||
> | ||
<EuiCallOut | ||
color="warning" | ||
iconType="iInCircle" | ||
size="m" | ||
title="Minimum privilege is too high to customize individual spaces" | ||
> | ||
<div | ||
className="euiCallOut euiCallOut--warning" | ||
> | ||
<div | ||
className="euiCallOutHeader" | ||
> | ||
<EuiIcon | ||
aria-hidden="true" | ||
className="euiCallOutHeader__icon" | ||
size="m" | ||
type="iInCircle" | ||
> | ||
<iInCircle | ||
aria-hidden="true" | ||
className="euiIcon euiIcon--medium euiCallOutHeader__icon" | ||
focusable="false" | ||
height="16" | ||
style={ | ||
Object { | ||
"fill": undefined, | ||
} | ||
} | ||
viewBox="0 0 16 16" | ||
width="16" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
className="euiIcon euiIcon--medium euiCallOutHeader__icon" | ||
focusable="false" | ||
height="16" | ||
style={ | ||
Object { | ||
"fill": undefined, | ||
} | ||
} | ||
viewBox="0 0 16 16" | ||
width="16" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M8.3 10.717H6.7v-4h1.6v4zm-1.6-5.71a.83.83 0 0 1 .207-.578c.137-.153.334-.229.59-.229.256 0 .454.076.594.23.14.152.209.345.209.576 0 .228-.07.417-.21.568-.14.15-.337.226-.593.226-.256 0-.453-.075-.59-.226a.81.81 0 0 1-.207-.568zM7.5 13A5.506 5.506 0 0 1 2 7.5C2 4.467 4.467 2 7.5 2S13 4.467 13 7.5 10.533 13 7.5 13m0-12a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13" | ||
fillRule="evenodd" | ||
/> | ||
</svg> | ||
</iInCircle> | ||
</EuiIcon> | ||
<span | ||
className="euiCallOutHeader__title" | ||
> | ||
Minimum privilege is too high to customize individual spaces | ||
</span> | ||
</div> | ||
<EuiText | ||
grow={true} | ||
size="s" | ||
> | ||
<div | ||
className="euiText euiText--small" | ||
> | ||
<p> | ||
Setting the minimum privilege to | ||
<strong> | ||
all | ||
</strong> | ||
grants full access to all spaces. To customize privileges for individual spaces, the minimum privilege must be either | ||
<strong> | ||
read | ||
</strong> | ||
or | ||
<strong> | ||
none | ||
</strong> | ||
. | ||
</p> | ||
</div> | ||
</EuiText> | ||
</div> | ||
</EuiCallOut> | ||
<div | ||
className="privilegeCallout--showSpacesLink" | ||
> | ||
<EuiSpacer | ||
size="l" | ||
> | ||
<div | ||
className="euiSpacer euiSpacer--l" | ||
/> | ||
</EuiSpacer> | ||
<EuiLink | ||
color="primary" | ||
onClick={[Function]} | ||
type="button" | ||
> | ||
<button | ||
className="euiLink euiLink--primary" | ||
onClick={[Function]} | ||
type="button" | ||
> | ||
See summary of all spaces privileges | ||
</button> | ||
</EuiLink> | ||
</div> | ||
</PrivilegeCalloutWarning> | ||
`; |
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.
This change prevents us from disabling the spaces plugin when security is enabled. How much additional work would be required to make the privilege management screens work with the spaces plugin disabled? We could leave the explicit references to Spaces from a code-perspective, while simply hiding/re-wording things when Spaces isn't enabled, which might lower the burden...
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.
Shouldn't take more than a day -- I have old code that I can resurrect from history as a starting point