public void terminateCheckout(long checkoutId, String user, boolean notify) throws IOException {
		synchronized (fileSystem) {
			validate();
			ItemCheckoutStatus coStatus = databaseItem.getCheckout(checkoutId);
			if (coStatus != null) {
				User userObj = repository.getUser(user);
				if (!userObj.isAdmin() && !coStatus.getUser().equals(user)) {
					throw new IOException(
						"Undo-checkout not permitted, checkout was made by " + coStatus.getUser());
				}
				databaseItem.terminateCheckout(checkoutId, notify);
			}
		}
	}
Terminate an existing checkout
@param checkoutId existing checkout ID
@param user user who initiated the request
@param notify if true notify listeners of item change.
@throws IOException if an IO error occurs
Ghidra/Features/GhidraServer/src/main/java/ghidra/server/store/RepositoryFile.java