Skip to content

Commit

Permalink
[SECURITY] Copy saved object flyout should not allow copying into the…
Browse files Browse the repository at this point in the history
… active space (#116657) (#116818)

* copy saved object flyout should not allow copying into the active space

* stupid me

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
  • Loading branch information
kibanamachine and XavierM authored Oct 29, 2021
1 parent 41de838 commit 15efa9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ const setup = async (opts: SetupOpts = {}) => {
return { wrapper, onClose, mockSpacesManager, mockToastNotifications, savedObjectToCopy };
};

// flaky https://github.com/elastic/kibana/issues/96708
describe.skip('CopyToSpaceFlyout', () => {
describe('CopyToSpaceFlyout', () => {
it('waits for spaces to load', async () => {
const { wrapper } = await setup({ returnBeforeSpacesLoad: true });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const CopyToSpaceFlyoutInternal = (props: CopyToSpaceFlyoutProps) => {
isLoading: false,
spaces: [...spacesMap.values()].filter(
({ isActiveSpace, isAuthorizedForPurpose }) =>
isActiveSpace || isAuthorizedForPurpose('copySavedObjectsIntoSpace')
!isActiveSpace && isAuthorizedForPurpose('copySavedObjectsIntoSpace')
),
});
})
Expand Down

0 comments on commit 15efa9d

Please sign in to comment.