Skip to content
Snippets Groups Projects

#396 - Add check for length of org description update to fail early w/ 400

Merged #396 - Add check for length of org description update to fail early w/ 400
Merged Martin Lowe requested to merge malowe/membership.eclipse.org:malowe/dev/396 into dev
1 file
+ 3
0
Compare changes
  • Side-by-side
  • Inline
@@ -153,6 +153,9 @@ public class OrganizationResource extends AbstractRESTResource {
@RolesAllowed({ CR, DE, CRA, MA })
@Path("{orgID:\\d+}")
public Response update(@PathParam("orgID") String organizationID, OrganizationInfoUpdateRequest updateRequest) {
if (updateRequest.getDescription().length() > 700) {
return new org.eclipsefoundation.core.model.Error(400, "Organization description should not be over 700 characters").asResponse();
}
// get ref and update the object
OrganizationInformation infoRef = eclipseDBDao.getReference(Integer.valueOf(organizationID),
OrganizationInformation.class);
Loading