Commit 24f40174 authored by Martin Lowe's avatar Martin Lowe 🇨🇦
Browse files

Merge branch 'malowe/dev/396' into 'dev'

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

See merge request !448
parents 8940d8b5 4f90b2ff
Pipeline #1558 passed with stage
in 0 seconds
......@@ -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
MultivaluedMap<String, String> params = new MultivaluedMapImpl<>();
params.add(DefaultUrlParameterNames.ID.getName(), 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