Fix for issue 2016 ssh keys not flushed
ssh keys that are added and deleted via the command line command set-account username --add-ssh-key don't take effect until after the caches have been flushed manually. This is cause by the fact that account.getUserName returns null. Change-Id: I23e66d5734f21bb5e378cfb99d4507379fc9334b
This commit is contained in:
@@ -136,6 +136,13 @@ final class SetAccountCommand extends BaseCommand {
|
|||||||
boolean accountUpdated = false;
|
boolean accountUpdated = false;
|
||||||
boolean sshKeysUpdated = false;
|
boolean sshKeysUpdated = false;
|
||||||
|
|
||||||
|
ResultSet<AccountExternalId> ids = db.accountExternalIds().byAccount(id);
|
||||||
|
for (AccountExternalId extId : ids) {
|
||||||
|
if (extId.isScheme(AccountExternalId.SCHEME_USERNAME)) {
|
||||||
|
account.setUserName(extId.getSchemeRest());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (String email : addEmails) {
|
for (String email : addEmails) {
|
||||||
link(id, email);
|
link(id, email);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user