-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Closed
Copy link
Labels
Team:SecurityPlatform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t//Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t//bugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experience
Description
Kibana version: 7.16 (unreleased)
Describe the bug:
Steps to reproduce:
- Start a fresh ES cluster and fresh Kibana instance
- Navigate to Stack Management > Saved objects
- Find the config object and click the "Copy to space" action
Expected behavior:
The flyout should exclude the active space from the list of target spaces. If there are no target spaces, the flyout should inform you that there are no other spaces to copy this object to.
Screenshots (if relevant):
This is currently what it looks like:
This is what it should look like:
Any additional context:
This was introduced during #109258 but we did not catch it because the unit test was unstable (failed under heavy CPU load) and it had been skipped 🤦
Need to make this change to fix it:
diff --git a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout_internal.tsx b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout_internal.tsx
index 7697780c352..3ff72e131aa 100644
--- a/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout_internal.tsx
+++ b/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout_internal.tsx
@@ -75,7 +75,7 @@ export const CopyToSpaceFlyoutInternal = (props: CopyToSpaceFlyoutProps) => {
isLoading: false,
spaces: [...spacesMap.values()].filter(
({ isActiveSpace, isAuthorizedForPurpose }) =>
- isActiveSpace || isAuthorizedForPurpose('copySavedObjectsIntoSpace')
+ !isActiveSpace && isAuthorizedForPurpose('copySavedObjectsIntoSpace')
),
});
})Thanks @XavierM for fixing the tests and discovering this!
Metadata
Metadata
Assignees
Labels
Team:SecurityPlatform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t//Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t//bugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experience

