@@ -92,6 +92,7 @@ public InternalInviteController(RoleRepository roleRepository,
9292
9393 @ GetMapping ("/roles" )
9494 @ PreAuthorize ("hasAnyRole('SP_DASHBOARD','ACCESS')" )
95+ @ Transactional (readOnly = true )
9596 @ Hidden
9697 public ResponseEntity <List <Role >> rolesByApplication (@ Parameter (hidden = true ) @ AuthenticationPrincipal RemoteUser remoteUser ) {
9798 LOG .debug (String .format ("/roles for user %s" , remoteUser .getName ()));
@@ -105,6 +106,19 @@ public ResponseEntity<List<Role>> rolesByApplication(@Parameter(hidden = true) @
105106 return ResponseEntity .ok (roles );
106107 }
107108
109+ @ GetMapping ("/roles/{organizationGUID}/{manageId}" )
110+ @ PreAuthorize ("hasRole('ACCESS')" )
111+ @ Transactional (readOnly = true )
112+ public ResponseEntity <List <Role >> rolesPerOrganizationApplicationId (@ PathVariable ("organizationGUID" ) String organizationGUID ,
113+ @ PathVariable ("manageId" ) String manageId ,
114+ @ Parameter (hidden = true ) @ AuthenticationPrincipal RemoteUser remoteUser ) {
115+ LOG .debug (String .format ("/rolesPerApplicationId for remoteUser %s" , remoteUser .getName ()));
116+
117+ List <Role > roles = roleRepository
118+ .findByOrganizationGUIDAndApplicationUsagesApplicationManageId (organizationGUID , manageId );
119+ return ResponseEntity .ok (roles );
120+ }
121+
108122 @ GetMapping ("/roles/{id}" )
109123 @ PreAuthorize ("hasAnyRole('SP_DASHBOARD','ACCESS')" )
110124 @ Hidden
0 commit comments