Skip to content

Commit

Permalink
UIREC-422. Revert logic to override to centralTenantContext (#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
SerhiiNosko authored Dec 19, 2024
1 parent 777b6da commit f0f3832
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,6 @@
"circulation.requests.item.move.post",
"circulation.requests.item.put",
"user-tenants.collection.get",
"orders-storage.settings.collection.get",
"consortia.sharing-instances.item.post"
]
},
Expand Down
9 changes: 2 additions & 7 deletions src/main/java/org/folio/helper/BindHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.folio.rest.jaxrs.model.ReceivedItem;
import org.folio.rest.jaxrs.model.Title;
import org.folio.rest.tools.utils.TenantTool;
import org.folio.service.consortium.ConsortiumConfigurationService;
import org.folio.service.inventory.InventoryInstanceManager;
import org.folio.service.inventory.InventoryItemRequestService;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -50,9 +49,6 @@ public class BindHelper extends CheckinReceivePiecesHelper<BindPiecesCollection>
@Autowired
private InventoryInstanceManager inventoryInstanceManager;

@Autowired
private ConsortiumConfigurationService consortiumConfigurationService;

public BindHelper(BindPiecesCollection bindPiecesCollection,
Map<String, String> okapiHeaders, Context ctx) {
super(okapiHeaders, ctx);
Expand Down Expand Up @@ -115,9 +111,8 @@ private Future<Void> clearTitleBindItemsIfNeeded(String titleId, String bindItem
}

public Future<BindPiecesResult> bindPieces(BindPiecesCollection bindPiecesCollection, RequestContext requestContext) {
return consortiumConfigurationService.overrideContextToCentralTenantIfNeeded(requestContext)
.compose(ctx -> removeForbiddenEntities(ctx)
.compose(vVoid -> processBindPieces(bindPiecesCollection, ctx)));
return removeForbiddenEntities(requestContext)
.compose(vVoid -> processBindPieces(bindPiecesCollection, requestContext));
}

private Future<BindPiecesResult> processBindPieces(BindPiecesCollection bindPiecesCollection, RequestContext requestContext) {
Expand Down

0 comments on commit f0f3832

Please sign in to comment.