Neymar-10-JR opened a new pull request, #7728:
URL: https://github.com/apache/shenyu/pull/7728
Fixes #7703.
Administrator requests to `/namespace/list?name=foo` currently return
all namespaces because the administrator branch ignores the name filter.
Use the existing `NamespaceQuery` and `selectByQuery` mapper method
to apply name filtering across the administrator's all-namespace scope.
This preserves the existing substring matching semantics and returns
all namespaces when the filter is null or empty.
Add service tests for administrator filtering, empty filters,
and non-administrator namespace permissions. Add an H2/MyBatis test
for substring matching, unmatched names, empty filters, and namespace scope.
### Validation
- Targeted namespace tests: 9 passed.
- Admin module test reports: 1996 tests, 0 failures, 0 errors, 1 skipped.
- Attempted `./mvnw clean install -Dmaven.javadoc.skip=true`.
The build stopped at `ApolloDataServiceTest#testProxySelectorDataDeleted`
in `shenyu-sync-data-apollo`: expected `test-proxy`, but received null.
- The Apollo test expects the proxy selector name, while the current
implementation populates its id. The failure also reproduces when
running that test independently, without shenyu-admin on its classpath.
No Apollo files are changed by this PR.
### Checklist
- [✅] I have read the [contribution
guidelines](https://shenyu.apache.org/community/contributor-guide).
- [x] I submit test cases (unit or integration tests) that back my changes.
- [ ] My local test passed `./mvnw clean install -Dmaven.javadoc.skip=true`.
--
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]