Aias00 opened a new issue, #7703:
URL: https://github.com/apache/shenyu/issues/7703

   ### Current behavior
   
   `GET /namespace/list` accepts a `name` parameter and forwards it to 
`NamespaceServiceImpl.list(name)`. When `SessionUtil.isAdmin()` is true, that 
method uses `namespaceMapper.selectAll()` and never applies `name`. Non-admin 
users take the separate `selectByNamespaceIdsAndName(namespaceIds, name)` path, 
which does filter.
   
   ### Location
   
   - 
[NamespaceController.java:82–85](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/NamespaceController.java#L82)
   - 
[NamespaceServiceImpl.java:183–196](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/NamespaceServiceImpl.java#L183)
   
   ### Trigger / expected result
   
   Create namespaces with distinguishable names, then as an administrator 
request `/namespace/list?name=foo`. The result should follow the endpoint's 
name-filter semantics and contain matching namespaces only. Currently all 
namespaces are returned. This is the non-paginated `/list` endpoint; the 
separate paginated query is not the claim.
   
   ### Impact / evidence
   
   **P3 / Low; high confidence, source confirmed.** Administrator search 
results ignore the requested filter. Two isolated reviewers independently 
traced the controller and service branches; no deployed API request was 
executed.
   
   ### Suggested fix
   
   Apply the same name-filter semantics to the administrator's all-namespace 
scope. Keep null/blank handling consistent with the non-admin branch.
   
   ### Related existing work
   
   No matching title in the complete issue baseline or live 
namespace/name-filter search. #6614 concerns namespace-plugin enabled mapping 
and #6870 concerns namespace-user insertion, not this endpoint's search 
behavior.
   
   
   ### Reviewed revision
   
   Apache ShenYu 2.7.2-SNAPSHOT, 
`master@66d7d954ca37d651a5ad916f988a8081157a7ab4`. This repository review 
excludes unit-test and CI issue categories.
   


-- 
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]

Reply via email to