X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/3a3de86b86ef60fc86f1190d42bc8a2471ab5276..4da9314a82505cd016803f806f96e5714cc59f0a:/src/views/ssh-key-panel/ssh-key-panel.tsx

diff --git a/src/views/ssh-key-panel/ssh-key-panel.tsx b/src/views/ssh-key-panel/ssh-key-panel.tsx
index c7e3516e..24ca3468 100644
--- a/src/views/ssh-key-panel/ssh-key-panel.tsx
+++ b/src/views/ssh-key-panel/ssh-key-panel.tsx
@@ -2,17 +2,21 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { RootState } from '~/store/store';
+import { RootState } from 'store/store';
 import { Dispatch } from 'redux';
 import { connect } from 'react-redux';
-import { openSshKeyCreateDialog, openPublicKeyDialog } from '~/store/auth/auth-action';
-import { openSshKeyContextMenu } from '~/store/context-menu/context-menu-actions';
-import { SshKeyPanelRoot, SshKeyPanelRootDataProps, SshKeyPanelRootActionProps } from '~/views/ssh-key-panel/ssh-key-panel-root';
+import { openSshKeyCreateDialog, openPublicKeyDialog } from 'store/auth/auth-action-ssh';
+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
     };
 };
 
@@ -20,12 +24,12 @@ const mapDispatchToProps = (dispatch: Dispatch): SshKeyPanelRootActionProps => (
     openSshKeyCreateDialog: () => {
         dispatch<any>(openSshKeyCreateDialog());
     },
-    openRowOptions: (event, index, sshKey) => {
-        dispatch<any>(openSshKeyContextMenu(event, index, sshKey));
+    openRowOptions: (event, sshKey) => {
+        dispatch<any>(openSshKeyContextMenu(event, sshKey));
     },
     openPublicKeyDialog: (name: string, publicKey: string) => {
         dispatch<any>(openPublicKeyDialog(name, publicKey));
     }
 });
 
-export const SshKeyPanel = connect(mapStateToProps, mapDispatchToProps)(SshKeyPanelRoot);
\ No newline at end of file
+export const SshKeyPanel = connect(mapStateToProps, mapDispatchToProps)(SshKeyPanelRoot);
