Skip to content
Snippets Groups Projects
Commit 24f40174 authored by Martin Lowe's avatar Martin Lowe :flag_ca:
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
No related branches found
No related tags found
2 merge requests!460Merge development into master for 1.3.2 release,!448#396 - Add check for length of org description update to fail early w/ 400
Pipeline #1558 passed with stage
in 0 seconds
......@@ -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
MultivaluedMap<String, String> params = new MultivaluedMapImpl<>();
params.add(DefaultUrlParameterNames.ID.getName(), organizationID);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment