Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Prevent setting default index set readonly. #3339
Motivation and Context
Without this change it was possible to update the default index set and make it read only, leading to unwanted behavior. After this change, when updating an index set we check if it is the default index set and kindly refuse setting it read only.
Removing superfluous id property from IndexSetUpdateRequest.
The id property of the IndexSetUpdateRequest DTO is unneeded, as the id of the index set to update is already given in the URL. It is actually misleading and requires an additional unneeded check to see if the ids of the URL and the body are consistent. Therefore the id is removed from the IndexSetUpdateRequest and the one from the URL is used only.
Types of changes
Additionally it would be great to disable the UI menu element "Set as default" if we know the corresponding index set is no writable in the first place.
Other than those comments, looks good to me!