Commit 4f90b2ff authored by Martin Lowe's avatar Martin Lowe 🇨🇦
Browse files

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

parent 619677f7
......@@ -153,6 +153,9 @@ public class OrganizationResource extends AbstractRESTResource {
@RolesAllowed({ CR, DE, CRA, MA })
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),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment