Merge branch 'stable-2.15' into stable-2.16
* stable-2.15: PutHttpPassword: Squash apply methods Clarify that account must have a username to be able to set HTTP password Change-Id: I4146d4a7fc00c855795e537f62c07d98026acaf1
This commit is contained in:
@@ -96,12 +96,8 @@ public class PutHttpPassword implements RestModifyView<AccountResource, HttpPass
|
||||
permissionBackend.currentUser().check(GlobalPermission.ADMINISTRATE_SERVER);
|
||||
newPassword = input.httpPassword;
|
||||
}
|
||||
return apply(rsrc.getUser(), newPassword);
|
||||
}
|
||||
|
||||
public Response<String> apply(IdentifiedUser user, String newPassword)
|
||||
throws ResourceNotFoundException, ResourceConflictException, OrmException, IOException,
|
||||
ConfigInvalidException {
|
||||
IdentifiedUser user = rsrc.getUser();
|
||||
String userName =
|
||||
user.getUserName().orElseThrow(() -> new ResourceConflictException("username must be set"));
|
||||
Optional<ExternalId> optionalExtId =
|
||||
|
||||
Reference in New Issue
Block a user