Skip to content

Commit

Permalink
MOSIP-32842 Fixed roles issue
Browse files Browse the repository at this point in the history
Signed-off-by: kameshsr <[email protected]>
  • Loading branch information
kameshsr committed May 13, 2024
1 parent f3917bf commit 1af6d5d
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class DeviceDetailController {
* @return ResponseEntity DeviceDetail which is inserted successfully
* {@link ResponseEntity}
*/
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostdevicedetail())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostdevicedetail())")
@ResponseFilter
@PostMapping
@Operation(summary = "Service to save DeviceDetail", description = "Saves DeviceDetail and return DeviceDetail id")
Expand Down Expand Up @@ -88,7 +88,7 @@ public ResponseWrapper<IdDto> createDeviceDetail(
* @return ResponseEntity DeviceDetail which is updated successfully
* {@link ResponseEntity}
*/
@PreAuthorize("hasAnyRole(@authorizedRoles.getPutdevicedetail())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPutdevicedetail())")
@ResponseFilter
@PutMapping
@Operation(summary = "Service to update DeviceDetails", description = "Updates DeviceDetails")
Expand Down Expand Up @@ -118,7 +118,7 @@ public ResponseWrapper<IdDto> updateDeviceDetail(
* @param deviceDetailRequestDto
* @return
*/
@PreAuthorize("hasAnyRole(@authorizedRoles.getPatchdevicedetail())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPatchdevicedetail())")
@ResponseFilter
@PatchMapping
@Operation(summary = "Service to approve/reject DeviceDetail", description = "Approve DeviceDetail and returns success message")
Expand Down Expand Up @@ -146,7 +146,7 @@ public ResponseWrapper<String> approveDeviceDetails(

@ResponseFilter
@PostMapping("/search")
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostdevicedetailsearch())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostdevicedetailsearch())")
@Operation(summary = "Service to search DeviceDetails", description = "ervice to search DeviceDetails")
public ResponseWrapper<PageResponseDto<DeviceDetailSearchResponseDto>> searchDeviceDetails(
@RequestBody @Valid RequestWrapper<DeviceSearchDto> request) {
Expand All @@ -157,7 +157,7 @@ public ResponseWrapper<PageResponseDto<DeviceDetailSearchResponseDto>> searchDev

@ResponseFilter
@PostMapping("/deviceType/search")
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostdevicedetaildevicetypesearch())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostdevicedetaildevicetypesearch())")
@Operation(summary = "Service to search DeviceTypes", description = "service to search DeviceTypes")
public ResponseWrapper<PageResponseDto<RegistrationSubTypeDto>> searchDeviceType(
@RequestBody @Valid RequestWrapper<DeviceSearchDto> request) {
Expand All @@ -168,7 +168,7 @@ public ResponseWrapper<PageResponseDto<RegistrationSubTypeDto>> searchDeviceType

@ResponseFilter
@PostMapping("/filtervalues")
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostdevicedetailfiltervalues())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostdevicedetailfiltervalues())")
@Operation(summary = "Service to filter DeviceDetails", description = "Service to filter DeviceDetails")
public ResponseWrapper<FilterResponseCodeDto> filterValues(
@RequestBody @Valid RequestWrapper<DeviceFilterValueDto> request) {
Expand All @@ -180,7 +180,7 @@ public ResponseWrapper<FilterResponseCodeDto> filterValues(

@ResponseFilter
@PostMapping("/deviceType/filtervalues")
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostdevicedetaildevicetypefiltervalues())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostdevicedetaildevicetypefiltervalues())")
@Operation(summary = "Service to filter DeviceTypes", description = "Service to filter DeviceTypes")
public ResponseWrapper<FilterResponseCodeDto> filterDeviceType(
@RequestBody @Valid RequestWrapper<DeviceFilterValueDto> request) {
Expand All @@ -191,7 +191,7 @@ public ResponseWrapper<FilterResponseCodeDto> filterDeviceType(

@ResponseFilter
@PostMapping("/deviceSubType/filtervalues")
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostdevicedetaildevicesubtypefiltervalues())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostdevicedetaildevicesubtypefiltervalues())")
@Operation(summary = "Service to filter DeviceSubTypes", description = "Service to filter DeviceSubTypes")
public ResponseWrapper<FilterResponseCodeDto> filterDeviceSubType(
@RequestBody @Valid RequestWrapper<DeviceFilterValueDto> request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class FTPChipDetailController {
* @return ResponseEntity DeviceDetail which is inserted successfully
* {@link ResponseEntity}
*/
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostftpchipdetail())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostftpchipdetail())")
@ResponseFilter
@PostMapping
@Operation(summary = "Service to save ftpChipDetail", description = "Saves ftpChipDetail and return ftpChipDetail id")
Expand Down Expand Up @@ -99,7 +99,7 @@ public ResponseWrapper<IdDto> createDeviceDetail(
* @return ResponseEntity DeviceDetail which is updated successfully
* {@link ResponseEntity}
*/
@PreAuthorize("hasAnyRole(@authorizedRoles.getPutftpchipdetail())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPutftpchipdetail())")
@ResponseFilter
@PutMapping
@Operation(summary = "Service to update ftp chip detail", description = "Updates ftp chip detail and returns success message")
Expand Down Expand Up @@ -129,7 +129,7 @@ public ResponseWrapper<IdDto> updateDeviceDetail(
* @param deviceDetailRequestDto
* @return
*/
@PreAuthorize("hasAnyRole(@authorizedRoles.getPatchftpchipdetail())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPatchftpchipdetail())")
@ResponseFilter
@PatchMapping
@Operation(summary = "Service to approve/reject ftp chip detail", description = "Approve ftp chip detail and returns success message")
Expand Down Expand Up @@ -165,7 +165,7 @@ public ResponseWrapper<String> approveDeviceDetails(
* @throws JsonMappingException
* @throws JsonParseException
*/
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostftpchipdetailuploadcertificate())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostftpchipdetailuploadcertificate())")
@RequestMapping(value = "/uploadcertificate", method = RequestMethod.POST)
@Operation(summary = "Service to upload certificate of ftp chip", description = "uploads the ftp chip certificate and returns success message")
public ResponseWrapper<FtpCertificateResponseDto> uploadPartnerCertificate(
Expand Down Expand Up @@ -195,7 +195,7 @@ public ResponseWrapper<FtpCertificateResponseDto> uploadPartnerCertificate(
* @throws JsonMappingException
* @throws JsonParseException
*/
@PreAuthorize("hasAnyRole(@authorizedRoles.getGetftpchipdetailgetpartnercertificate())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getGetftpchipdetailgetpartnercertificate())")
@RequestMapping(value = "/getPartnerCertificate/{ftpChipDetailId}", method = RequestMethod.GET)
@Operation(summary = "Service to get certificate of ftp chip", description = "Returns the ftp chip certificate")
public ResponseWrapper<FtpCertDownloadResponeDto> getPartnerCertificate(
Expand All @@ -222,7 +222,7 @@ public ResponseWrapper<FtpCertDownloadResponeDto> getPartnerCertificate(

@ResponseFilter
@PostMapping("/search")
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostftpchipdetailsearch())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostftpchipdetailsearch())")
@Operation(summary = "Service to serach ftp chip details", description = "Service to serach ftp chip details")
public ResponseWrapper<PageResponseDto<FTPSearchResponseDto>> searchFtpChipDetails(
@RequestBody @Valid RequestWrapper<DeviceSearchDto> request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class SecureBiometricInterfaceController {
@Autowired
AuditUtil auditUtil;

@PreAuthorize("hasAnyRole(@authorizedRoles.getPostsecurebiometricinterface())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostsecurebiometricinterface())")
@ResponseFilter
@PostMapping
@Operation(summary = "Service to save SecureBiometricInterfaceCreateDto", description = "Saves SecureBiometricInterfaceCreateDto and return DeviceDetail id")
Expand All @@ -74,7 +74,7 @@ public ResponseWrapper<IdDto> SecureBiometricInterface(

}

@PreAuthorize("hasAnyRole(@authorizedRoles.getPutsecurebiometricinterface())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPutsecurebiometricinterface())")
@ResponseFilter
@PutMapping
@Operation(summary = "Service to update SecureBiometricInterface", description = "Updates SecureBiometricInterface and returns success message")
Expand All @@ -100,7 +100,7 @@ public ResponseWrapper<IdDto> updateSecureBiometricInterface(
return responseWrapper;
}

@PreAuthorize("hasAnyRole(@authorizedRoles.getPatchsecurebiometricinterface())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPatchsecurebiometricinterface())")
@ResponseFilter
@PatchMapping
@Operation(summary = "Service to approve/reject SecureBiometricInterface", description = "Approve SecureBiometricInterface and returns success message")
Expand Down Expand Up @@ -128,7 +128,7 @@ public ResponseWrapper<String> approveSecureBiometricInterface(

@ResponseFilter
@PostMapping("/search")
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostsecurebiometricinterfacesearch())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostsecurebiometricinterfacesearch())")
@Operation(summary = "Service to search SecureBiometricInterface details", description = "Service to search SecureBiometricInterface details")
public ResponseWrapper<PageResponseDto<SbiSearchResponseDto>> searchSecureBiometric(
@RequestBody @Valid RequestWrapper<DeviceSearchDto> request) {
Expand All @@ -140,7 +140,7 @@ public ResponseWrapper<PageResponseDto<SbiSearchResponseDto>> searchSecureBiomet

@ResponseFilter
@PutMapping("/devicedetails/map")
@PreAuthorize("hasAnyRole(@authorizedRoles.getPutsecurebiometricinterfacedevicedetailsmap())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPutsecurebiometricinterfacedevicedetailsmap())")
@Operation(summary = "Service to map device details with sbi", description = "Service to map device details with sbi")
public ResponseWrapper<String> mapDeviceDetails(
@RequestBody @Valid RequestWrapper<DeviceDetailSBIMappingDto> request) {
Expand All @@ -151,7 +151,7 @@ public ResponseWrapper<String> mapDeviceDetails(

@ResponseFilter
@PutMapping("/devicedetails/map/remove")
@PreAuthorize("hasAnyRole(@authorizedRoles.getPutsecurebiometricinterfacedevicedetailsmapremove())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPutsecurebiometricinterfacedevicedetailsmapremove())")
@Operation(summary = "Service to remove mapped device details with sbi", description = "Service to remove mapped device details with sbi")
public ResponseWrapper<String> removeMappedDeviceDetails(
@RequestBody @Valid RequestWrapper<DeviceDetailSBIMappingDto> request) {
Expand All @@ -162,7 +162,7 @@ public ResponseWrapper<String> removeMappedDeviceDetails(

@ResponseFilter
@PostMapping("/devicedetails/map/search")
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostsecurebiometricinterfacedevicedetailsmapsearch())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostsecurebiometricinterfacedevicedetailsmapsearch())")
@Operation(summary = "Service to search mapped device details and SecureBiometricInterface details", description = "Service to search mapped device details and SecureBiometricInterface details")
public ResponseWrapper<PageResponseDto<MappedDeviceDetailsReponse>> searchMappedDeviceDetails(
@RequestBody @Valid RequestWrapper<DeviceSearchDto> request) {
Expand All @@ -174,7 +174,7 @@ public ResponseWrapper<PageResponseDto<MappedDeviceDetailsReponse>> searchMapped

@ResponseFilter
@PostMapping("/filtervalues")
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostsecurebiometricinterfacefiltervalues())")
@PreAuthorize("hasAnyRole(@authorizedRolesPms.getPostsecurebiometricinterfacefiltervalues())")
@Operation(summary = "Service to filter SBI's", description = "Service to filter SBI's")
public ResponseWrapper<FilterResponseCodeDto> filterValues(
@RequestBody @Valid RequestWrapper<FilterValueDto> request) {
Expand Down
Loading

0 comments on commit 1af6d5d

Please sign in to comment.