Commit 2a0f6ed5 authored by Preksha Beohar-Slb's avatar Preksha Beohar-Slb
Browse files

Granting OPS permission to use DeleteMemberApi

parent 32089ef4
Pipeline #68131 failed with stages
in 30 minutes and 38 seconds
...@@ -2,6 +2,7 @@ package org.opengroup.osdu.entitlements.v2.api; ...@@ -2,6 +2,7 @@ package org.opengroup.osdu.entitlements.v2.api;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.opengroup.osdu.core.common.model.http.RequestInfo; import org.opengroup.osdu.core.common.model.http.RequestInfo;
import org.opengroup.osdu.entitlements.v2.AppProperties;
import org.opengroup.osdu.entitlements.v2.model.deletemember.DeleteMemberDto; import org.opengroup.osdu.entitlements.v2.model.deletemember.DeleteMemberDto;
import org.opengroup.osdu.entitlements.v2.service.DeleteMemberService; import org.opengroup.osdu.entitlements.v2.service.DeleteMemberService;
import org.opengroup.osdu.entitlements.v2.util.RequestInfoUtilService; import org.opengroup.osdu.entitlements.v2.util.RequestInfoUtilService;
...@@ -22,7 +23,7 @@ public class DeleteMemberApi { ...@@ -22,7 +23,7 @@ public class DeleteMemberApi {
private final PartitionHeaderValidationService partitionHeaderValidationService; private final PartitionHeaderValidationService partitionHeaderValidationService;
@DeleteMapping("/members/{member_email}") @DeleteMapping("/members/{member_email}")
@PreAuthorize("@authorizationFilter.hasAnyPermission()") @PreAuthorize("@authorizationFilter.hasAnyPermission('" + AppProperties.OPS + "')")
public ResponseEntity<Void> deleteMember(@PathVariable("member_email") String memberEmail) { public ResponseEntity<Void> deleteMember(@PathVariable("member_email") String memberEmail) {
String partitionId = requestInfo.getHeaders().getPartitionId(); String partitionId = requestInfo.getHeaders().getPartitionId();
partitionHeaderValidationService.validateSinglePartitionProvided(partitionId); partitionHeaderValidationService.validateSinglePartitionProvided(partitionId);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment