|
Lines 21-28
Link Here
|
| 21 |
import org.eclipse.jface.layout.GridLayoutFactory; |
21 |
import org.eclipse.jface.layout.GridLayoutFactory; |
| 22 |
import org.eclipse.jface.layout.LayoutConstants; |
22 |
import org.eclipse.jface.layout.LayoutConstants; |
| 23 |
import org.eclipse.swt.SWT; |
23 |
import org.eclipse.swt.SWT; |
| 24 |
import org.eclipse.swt.events.SelectionEvent; |
24 |
import org.eclipse.swt.events.*; |
| 25 |
import org.eclipse.swt.events.SelectionListener; |
|
|
| 26 |
import org.eclipse.swt.layout.GridData; |
25 |
import org.eclipse.swt.layout.GridData; |
| 27 |
import org.eclipse.swt.layout.GridLayout; |
26 |
import org.eclipse.swt.layout.GridLayout; |
| 28 |
import org.eclipse.swt.widgets.*; |
27 |
import org.eclipse.swt.widgets.*; |
|
Lines 36-41
Link Here
|
| 36 |
|
35 |
|
| 37 |
protected Table providerTable; |
36 |
protected Table providerTable; |
| 38 |
|
37 |
|
|
|
38 |
protected Button buttonClearPassword; |
| 39 |
protected Button buttonChangePassword; |
39 |
protected Button buttonChangePassword; |
| 40 |
protected Button buttonRecoverPassword; |
40 |
protected Button buttonRecoverPassword; |
| 41 |
|
41 |
|
|
Lines 78-94
Link Here
|
| 78 |
Composite rightPart = new Composite(page, SWT.NONE); |
78 |
Composite rightPart = new Composite(page, SWT.NONE); |
| 79 |
rightPart.setLayout(new GridLayout()); |
79 |
rightPart.setLayout(new GridLayout()); |
| 80 |
|
80 |
|
| 81 |
Button buttonClearPassword = new Button(rightPart, SWT.NONE); |
81 |
buttonClearPassword = new Button(rightPart, SWT.NONE); |
| 82 |
buttonClearPassword.setText(SecUIMessages.logoutButton); |
82 |
buttonClearPassword.setText(SecUIMessages.logoutButton); |
| 83 |
buttonClearPassword.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false)); |
83 |
buttonClearPassword.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false)); |
| 84 |
buttonClearPassword.addSelectionListener(new SelectionListener() { |
84 |
buttonClearPassword.addSelectionListener(new SelectionAdapter() { |
| 85 |
|
|
|
| 86 |
public void widgetDefaultSelected(SelectionEvent e) { |
| 87 |
widgetSelected(e); |
| 88 |
} |
| 89 |
|
85 |
|
| 90 |
public void widgetSelected(SelectionEvent e) { |
86 |
public void widgetSelected(SelectionEvent e) { |
| 91 |
InternalExchangeUtils.passwordProvidersLogout(); |
87 |
InternalExchangeUtils.passwordProvidersReset(); |
|
|
88 |
enableLogout(); |
| 92 |
} |
89 |
} |
| 93 |
}); |
90 |
}); |
| 94 |
|
91 |
|
|
Lines 106-111
Link Here
|
| 106 |
ISecurePreferences rootNode = SecurePreferencesFactory.getDefault(); |
103 |
ISecurePreferences rootNode = SecurePreferencesFactory.getDefault(); |
| 107 |
ChangePasswordWizardDialog dialog = new ChangePasswordWizardDialog(shell, rootNode, moduleID); |
104 |
ChangePasswordWizardDialog dialog = new ChangePasswordWizardDialog(shell, rootNode, moduleID); |
| 108 |
dialog.open(); |
105 |
dialog.open(); |
|
|
106 |
enableLogout(); |
| 109 |
} |
107 |
} |
| 110 |
}); |
108 |
}); |
| 111 |
|
109 |
|
|
Lines 126-131
Link Here
|
| 126 |
return; // no password recovery questions were setup |
124 |
return; // no password recovery questions were setup |
| 127 |
PasswordRecoveryDialog dialog = new PasswordRecoveryDialog(questions, shell, moduleID); |
125 |
PasswordRecoveryDialog dialog = new PasswordRecoveryDialog(questions, shell, moduleID); |
| 128 |
dialog.open(); |
126 |
dialog.open(); |
|
|
127 |
enableLogout(); |
| 129 |
} |
128 |
} |
| 130 |
}); |
129 |
}); |
| 131 |
|
130 |
|
|
Lines 185-190
Link Here
|
| 185 |
boolean recoveryAvailable = rootNode.nodeExists(path); |
184 |
boolean recoveryAvailable = rootNode.nodeExists(path); |
| 186 |
buttonRecoverPassword.setEnabled(recoveryAvailable); |
185 |
buttonRecoverPassword.setEnabled(recoveryAvailable); |
| 187 |
} |
186 |
} |
|
|
187 |
enableLogout(); |
| 188 |
} |
188 |
} |
| 189 |
|
189 |
|
| 190 |
protected HashSet getDisabledModules() { |
190 |
protected HashSet getDisabledModules() { |
|
Lines 244-247
Link Here
|
| 244 |
InternalExchangeUtils.passwordProvidersReset(); |
244 |
InternalExchangeUtils.passwordProvidersReset(); |
| 245 |
} |
245 |
} |
| 246 |
|
246 |
|
|
|
247 |
public void onActivated() { |
| 248 |
enableLogout(); |
| 249 |
} |
| 250 |
|
| 251 |
protected void enableLogout() { |
| 252 |
buttonClearPassword.setEnabled(InternalExchangeUtils.isLoggedIn()); |
| 253 |
} |
| 254 |
|
| 247 |
} |
255 |
} |