[SECURITY] Copy saved object flyout should not allow copying into the active space (#116657) (#116817)

* 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>
This commit is contained in:
Kibana Machine 2021-10-29 19:46:30 -04:00 committed by GitHub
parent ddc85d95b1
commit 91b28f3351
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -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 });

View file

@ -75,7 +75,7 @@ export const CopyToSpaceFlyoutInternal = (props: CopyToSpaceFlyoutProps) => {
isLoading: false,
spaces: [...spacesMap.values()].filter(
({ isActiveSpace, isAuthorizedForPurpose }) =>
isActiveSpace || isAuthorizedForPurpose('copySavedObjectsIntoSpace')
!isActiveSpace && isAuthorizedForPurpose('copySavedObjectsIntoSpace')
),
});
})