jamesfredley opened a new pull request, #15480:
URL: https://github.com/apache/grails-core/pull/15480
## Summary
- Fix `User.getAuthorities()` which incorrectly used `roles.split('')` -
this split each character of the role string into a separate `GrantedAuthority`
(e.g., 'R', 'O', 'L', 'E', '_', 'U', 'S', 'E', 'R') instead of splitting by
comma delimiter. Changed to `roles.split(',')` with `trim()` for correct role
parsing.
- Fix flaky `UserControllerSpec` and `UserCommunityControllerSpec` Geb tests
that fail on Java 25 CI. The tests used `setup()` to perform login, but the
HTTP session was lost between the Spock lifecycle boundary (`setup()` -> test
method), causing the browser to see "Please sign in" instead of the expected
page. Moved login into each test's `when` block via an `ensureLoggedIn()`
helper to eliminate the session gap.
## Changes
| File | Change |
|------|--------|
| `User.groovy` | `roles.split('')` -> `roles.split(',')` with `trim()` |
| `UserControllerSpec.groovy` | Move login from `setup()` to `when` block |
| `UserCommunityControllerSpec.groovy` | Move login from `setup()` to `when`
block |
## Testing
- All scaffolding integration tests pass locally with `--rerun-tasks
-PgebAtCheckWaiting`
- Code style checks pass (`./gradlew codeStyle`)
--
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]