apache / apache/grails-core

Grails 7, Removing user still has access.

Open
#15,846 10 comments 0 reactions 0 assignees View on GitHub
relates-to:spring-security
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

### Expected Behavior

I stop the app and remove Admin user from BootStrap, i expect Admin user has no access any more.

### Actual Behaviour

Even Admin user does exist anymore. I can verify that from H2-DB and in grails-spring-security-ui:7.0.0-RC2 console.
Admin user still has access to the app.

You can go page to page no problem. You are still Amin. Even admin user doesn't exist.

### Steps To Reproduce

1. create an app with 'grails-spring-security:7.0.0-RC2' or 'grails-spring-security-ui:7.0.0-RC2'.
2. add Admin user and role from BootStrap.groovy
3. Create an GSP page with tags or
4. start the app.
5. login with Remember Me checked.
6. All work correctly
7. Don't close browser
8. turn OFF the app
9. remove Admin from BootStrap.groovy
10. Start app
11. go back to browser
12. Shift-Reload browser,
13. tags or still think you are login as Admin

You can go page to page no problem. You are still Amin. Even admin user doesn't exist.

### Environment Information

java=21.0.8-zulu
gradle=8.14.3
groovy=4.0.28
grails=7.0.0-RC2

### Example Application

https://github.com/arjangch/grails-project-helper/tree/main/example3

### Version

7.0.0-RC2

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the steps in the linked example application with the listed Grails, Spring Security, Java, and Gradle versions. Inspect BootStrap.groovy, the remember-me login flow, and the GSP security tags; done means deleting the Admin user removes access after restart and the tags no longer identify the user as logged in.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
authentication, authorization, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.