Merge branch 'stable-2.16' into stable-3.0

* stable-2.16:
  Export more libraries needed by review-assistant plugin
  PutHttpPassword: Add comment to prevent accidental removal of method
  Revert "PutHttpPassword: Squash apply methods"

PutHttpPassword: Adjust to remove the now obsoleted OrmException.

Change-Id: I20832af46956f2f1922e9882af3e2660341fa15d
This commit is contained in:
Marco Miller
2019-05-29 12:28:05 -04:00
committed by David Pursehouse
2 changed files with 8 additions and 1 deletions

View File

@@ -103,8 +103,14 @@ public class PutHttpPassword implements RestModifyView<AccountResource, HttpPass
permissionBackend.currentUser().check(GlobalPermission.ADMINISTRATE_SERVER);
newPassword = input.httpPassword;
}
return apply(rsrc.getUser(), newPassword);
}
IdentifiedUser user = rsrc.getUser();
// Used by the admin console plugin
// TODO(dpursehouse): Replace comment with @UsedAt
public Response<String> apply(IdentifiedUser user, String newPassword)
throws ResourceNotFoundException, ResourceConflictException, IOException,
ConfigInvalidException {
String userName =
user.getUserName().orElseThrow(() -> new ResourceConflictException("username must be set"));
Optional<ExternalId> optionalExtId =