pradeepagrawal8184 opened a new pull request, #1145: URL: https://github.com/apache/ranger/pull/1145
## What changes were proposed in this pull request? ## Summary Aligns the legacy public repository search API (`PublicAPIs.searchRepositories`) with the internal assets search endpoint (`AssetREST.searchXAssets`) for authorization and service detail handling. - Adds the standard `@PreAuthorize` API access check (`SEARCH_X_ASSETS`) to `GET /service/public/api/repository/` - Updates `searchRepositories` to follow the same response-building pattern as `AssetREST.searchXAssets` (always returns a non-null list wrapper, converts services individually, sets list metadata) - Applies existing service detail redaction in `ServiceREST.getServices(SearchFilter)` so behavior matches the request-based services lookup path ## Changes - `PublicAPIs.java` — authorization annotation and response handling for `searchRepositories` - `ServiceREST.java` — service detail redaction in `getServices(SearchFilter)` - `TestPublicAPIs.java` — updated unit test for the new conversion path ## How was this patch tested? ## Test plan - [ ] `TestPublicAPIs.test5searchRepositories` passes - [ ] Authorized admin user: `GET /service/public/api/repository/?pageSize=200` returns `200` with repository list - [ ] Authorized non-admin user: same endpoint returns `200` with repository list (consistent with `/service/assets/assets`) - [ ] User without module permissions: receives appropriate access denied response - [ ] Verify trailing slash URL: `/service/public/api/repository/` (required for this endpoint) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
