Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1686-SSH-Key-pair-should-not-ask-user-it-should-use-the-user-from-the-URL #1687

Open
wants to merge 2 commits into
base: dev-2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions BaselineOfIceberg/BaselineOfIceberg.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ BaselineOfIceberg >> customProjectAttributes [

{ #category : #baseline }
BaselineOfIceberg >> libgit: spec [
spec
baseline: 'LibGit'
with: [
spec
baseline: 'LibGit'
with: [
spec
repository: 'github://pharo-vcs/libgit2-pharo-bindings:v3.0.6';
loads: 'default' ].
spec
spec
project: 'LibGit-Tests'
copyFrom: 'LibGit'
with: [ spec loads: #('tests') ]
Expand Down
7 changes: 3 additions & 4 deletions Iceberg-TipUI/IceTipAbstractCredentialsModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ IceTipAbstractCredentialsModel >> cancelAction [
IceTipAbstractCredentialsModel >> cancelAskAction [

accepted := true.
self closeWindow.
LGitNoCredentialsProvided signal
self closeWindow
]

{ #category : #actions }
Expand Down Expand Up @@ -159,12 +158,12 @@ IceTipAbstractCredentialsModel >> open [
^ self credentials
]

{ #category : #accessing }
{ #category : #actions }
IceTipAbstractCredentialsModel >> refreshCredentialsFromPresenter [
"Hook to update the credentials object from the presenter inputs."
]

{ #category : #accessing }
{ #category : #actions }
IceTipAbstractCredentialsModel >> refreshPresenterFromCredentials [
"Hook to update the presenter input fields from the credentials object."
]
Expand Down
21 changes: 2 additions & 19 deletions Iceberg-TipUI/IceTipAbstractSSHCredentialsModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Class {
#name : #IceTipAbstractSSHCredentialsModel,
#superclass : #IceTipAbstractCredentialsModel,
#instVars : [
'usernameInput',
'usernameLabel',
'publicKeyInput',
'privateKeyInput',
'passphraseInput',
Expand All @@ -22,13 +20,6 @@ Class {
IceTipAbstractSSHCredentialsModel >> initializePresenters [

super initializePresenters.
usernameLabel := self newLabel
label: 'Username: ';
yourself.
usernameInput := self newTextInput
autoAccept: true;
whenTextChangedDo: [ self updateOkButton ];
yourself.
passphraseLabel := self newLabel
label: 'Key Passphrase: ';
yourself.
Expand All @@ -52,15 +43,13 @@ IceTipAbstractSSHCredentialsModel >> initializePresenters [
onChoose: [ self updateOkButton ];
chooseTitle: 'Select Public Key';
whenTextChanged: [ self updateOkButton ];
yourself.

yourself
]

{ #category : #testing }
IceTipAbstractSSHCredentialsModel >> isOkEnabled [

^ self username isNotEmpty and: [
self publicKey isNotEmpty and: [ self privateKey isNotEmpty ] ]
^ self publicKey isNotEmpty and: [ self privateKey isNotEmpty ]
]

{ #category : #accessing }
Expand All @@ -84,9 +73,3 @@ IceTipAbstractSSHCredentialsModel >> publicKey [
ifNil: [ '' ]
ifNotNil: [ :x | x pathString ]
]

{ #category : #accessing }
IceTipAbstractSSHCredentialsModel >> username [

^ usernameInput text
]
6 changes: 2 additions & 4 deletions Iceberg-TipUI/IceTipAddSSHCredentialsModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ IceTipAddSSHCredentialsModel >> defaultLayout [
column: 2 expand: true;
build: [ :builder | builder
add: hostLabel; add: hostInput; nextRow;
add: usernameLabel; add: usernameInput; nextRow;
add: publicKeyLabel; add: publicKeyInput; nextRow;
add: privateKeyLabel; add: privateKeyInput; nextRow;
add: passphraseLabel; add: passphraseInput; nextRow ]
Expand Down Expand Up @@ -59,13 +58,12 @@ IceTipAddSSHCredentialsModel >> initializePresenters [

{ #category : #accessing }
IceTipAddSSHCredentialsModel >> newCredentials [

^ IceSshCredentials new
username: self username;
publicKey: self publicKey;
privateKey: self privateKey;
keyPassphrase: self passphrase;
yourself
yourself
]

{ #category : #initialization }
Expand Down
7 changes: 7 additions & 0 deletions Iceberg-TipUI/IceTipAskSSHCredentialsModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ IceTipAskSSHCredentialsModel >> cancelAction [
self cancelAskAction
]

{ #category : #actions }
IceTipAskSSHCredentialsModel >> cancelAskAction [

super cancelAskAction.
LGitNoCredentialsProvided signal
]

{ #category : #accessing }
IceTipAskSSHCredentialsModel >> newCredentials [

Expand Down
11 changes: 4 additions & 7 deletions Iceberg-TipUI/IceTipEditSSHCredentialsModel.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ IceTipEditSSHCredentialsModel >> accept [
{ #category : #layout }
IceTipEditSSHCredentialsModel >> defaultLayout [

^ SpGridLayout new
^ SpGridLayout new
beColumnNotHomogeneous;
column: 2 expand: true;
build: [ :builder | builder
add: usernameLabel; add: usernameInput; nextRow;
add: publicKeyLabel; add: publicKeyInput; nextRow;
build: [ :builder | builder
add: publicKeyLabel; add: publicKeyInput; nextRow;
add: privateKeyLabel; add: privateKeyInput; nextRow;
add: passphraseLabel; add: passphraseInput; nextRow ];
yourself
Expand All @@ -37,16 +36,14 @@ IceTipEditSSHCredentialsModel >> initialExtentForWindow [
IceTipEditSSHCredentialsModel >> refreshCredentialsFromPresenter [

credentials
username: self username;
publicKey: self publicKey;
privateKey: self privateKey;
keyPassphrase: self passphrase
]

{ #category : #accessing }
{ #category : #actions }
IceTipEditSSHCredentialsModel >> refreshPresenterFromCredentials [

usernameInput text: credentials username.
passphraseInput text: credentials keyPassphrase.
privateKeyInput location: credentials privateKey.
publicKeyInput location: credentials publicKey
Expand Down