15768: standardized naming Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox@curii...
[arvados.git] / src / views / ssh-key-panel / ssh-key-panel.tsx
index 4d896f3d4b4f705a4f87005d1c6ed22560c10fda..24ca3468d181bc37dafe9d51f2cbdc4098fc7ae5 100644 (file)
@@ -10,9 +10,13 @@ import { openSshKeyContextMenu } from 'store/context-menu/context-menu-actions';
 import { SshKeyPanelRoot, SshKeyPanelRootDataProps, SshKeyPanelRootActionProps } from 'views/ssh-key-panel/ssh-key-panel-root';
 
 const mapStateToProps = (state: RootState): SshKeyPanelRootDataProps => {
+    const sshKeys = state.auth.sshKeys.filter((key) => {
+      return key.authorizedUserUuid === (state.auth.user ? state.auth.user.uuid : null);
+    });
+
     return {
-        sshKeys: state.auth.sshKeys,
-        hasKeys: state.auth.sshKeys!.length > 0
+        sshKeys: sshKeys,
+        hasKeys: sshKeys!.length > 0
     };
 };