PutHttpPassword: Squash apply methods
There is no need to have a second apply method that is not called from anywhere. Change-Id: I3773af3b5ef236dc5b8546749f23d4987482b503
This commit is contained in:
@@ -97,12 +97,8 @@ public class PutHttpPassword implements RestModifyView<AccountResource, Input> {
|
|||||||
permissionBackend.user(self).check(GlobalPermission.ADMINISTRATE_SERVER);
|
permissionBackend.user(self).check(GlobalPermission.ADMINISTRATE_SERVER);
|
||||||
newPassword = input.httpPassword;
|
newPassword = input.httpPassword;
|
||||||
}
|
}
|
||||||
return apply(rsrc.getUser(), newPassword);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Response<String> apply(IdentifiedUser user, String newPassword)
|
IdentifiedUser user = rsrc.getUser();
|
||||||
throws ResourceNotFoundException, ResourceConflictException, OrmException, IOException,
|
|
||||||
ConfigInvalidException {
|
|
||||||
if (user.getUserName() == null) {
|
if (user.getUserName() == null) {
|
||||||
throw new ResourceConflictException("username must be set");
|
throw new ResourceConflictException("username must be set");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user