hunk.code_window:                         .thenReturn(true);
               }
               log.debug("The invited user {} doesn't exist in the system. Creating a new record", inviteUser.getEmail());
               // The user doesn't exist in the system. Create a new user object
               newUser.setPassword(inviteUser.getPassword());
               return this.create(newUser)
                       .flatMap(createdUser -> userOrganizationService.addUserToOrganization(newUser.getCurrentOrganizationId(), createdUser))
                       .thenReturn(newUser)
                       .flatMap(userToDelete -> inviteUserRepository.delete(userToDelete))
  
hunk.labels: keep keep keep keep keep replace keep keep keep
hunk.after_edit:             return this.createUser(newUser, originHeader)
  
hunk.file_path: app/server/appsmith-server/src/main/java/com/appsmith/server/services/UserServiceImpl.java
hunk.type: replace
file: package com.appsmith.server.controllers;
  
  import com.appsmith.server.constants.Url;
  import com.appsmith.server.domains.Organization;
  import com.appsmith.server.domains.Plugin;
  import com.appsmith.server.dtos.PluginOrgDTO;
  import com.appsmith.server.dtos.ResponseDTO;
  import com.appsmith.server.services.PluginService;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.http.HttpStatus;
  import org.springframework.util.MultiValueMap;
  import org.springframework.web.bind.annotation.GetMapping;
  import org.springframework.web.bind.annotation.PostMapping;
  import org.springframework.web.bind.annotation.RequestBody;
  import org.springframework.web.bind.annotation.RequestHeader;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestParam;
  import org.springframework.web.bind.annotation.ResponseStatus;
  import org.springframework.web.bind.annotation.RestController;
  import reactor.core.publisher.Mono;
  
  import javax.validation.Valid;
  import java.util.List;
  
  
  @RestController
  @RequestMapping(Url.PLUGIN_URL)
  public class PluginController extends BaseController<PluginService, Plugin, String> {
  
      @Autowired
      public PluginController(PluginService service) {
          super(service);
      }
  
      @PostMapping("/install")
      @ResponseStatus(HttpStatus.CREATED)
      public Mono<ResponseDTO<Organization>> install(@Valid @RequestBody PluginOrgDTO plugin) {
          return service.installPlugin(plugin)
                  .map(organization -> new ResponseDTO<>(HttpStatus.CREATED.value(), organization, null));
      }
  
      @PostMapping("/uninstall")
      @ResponseStatus(HttpStatus.CREATED)
      public Mono<ResponseDTO<Organization>> uninstall(@Valid @RequestBody PluginOrgDTO plugin) {
          return service.uninstallPlugin(plugin)
                  .map(organization -> new ResponseDTO<>(HttpStatus.CREATED.value(), organization, null));
      }
  
      @GetMapping("")
      @Override
      public Mono<ResponseDTO<List<Plugin>>> getAll(@RequestParam MultiValueMap<String, String> params) {
          return service.get(params).collectList()
                  .map(resources -> new ResponseDTO<>(HttpStatus.OK.value(), resources, null));
      }
  }
  