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

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

* stupid me
This commit is contained in:
Xavier Mouligneau 2021-10-29 13:55:17 -04:00 committed by GitHub
parent 45476dcbe6
commit 3f91556e67
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')
),
});
})