Showing 1 changed files with 8 additions and 3 deletions
+8 -3
lib/Gitprep/Manager.pm
... ...
@@ -538,12 +538,17 @@ sub update_authorized_keys_file {
538 538
     }
539 539
 
540 540
     # Create public keys
541
-    my $ssh_public_keys = $self->app->dbi->model('ssh_public_key')->select->all;
541
+    my $ssh_public_keys = $self->app->dbi->model('ssh_public_key')->select(
542
+      [
543
+        {__MY__ => '*'},
544
+        {__user => ['id']}
545
+      ]
546
+    )->all;
542 547
     my $ssh_public_keys_str = '';
543 548
     for my $key (@$ssh_public_keys) {
544 549
       my $ssh_public_key_str = 'command="' . $self->app->home->rel_file('script/gitprep-shell')
545
-        . " $key->{user_id}\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty $key->{key}";
546
-      $ssh_public_keys_str .= "$ssh_public_key_str $key->{user_id}\n\n";
550
+        . " $key->{'__user.id'}\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty $key->{key}";
551
+      $ssh_public_keys_str .= "$ssh_public_key_str $key->{'__user.id'}\n\n";
547 552
     }
548 553
     
549 554
     # Output tmp file