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:
parent
7549dfa817
commit
07ec76188c
@ -136,6 +136,13 @@ final class SetAccountCommand extends BaseCommand {
|
||||
boolean accountUpdated = 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) {
|
||||
link(id, email);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user