You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This simple hierarchy is working on Grails 3. A user with ROLE_ADMIN rol, also have the ROLE_USER rol.
Actual Behaviour
This hiearchy specification is not working on Grails 4, and it is not giving any warning or error on application bootup.
A user with ROLE_ADMIN only has this role and it is not inheriting the ROLE_USER.
Expected Behavior
The role hierarchy relationship is specified by the ">" operator:
This simple hierarchy is working on Grails 3. A user with ROLE_ADMIN rol, also have the ROLE_USER rol.
Actual Behaviour
This hiearchy specification is not working on Grails 4, and it is not giving any warning or error on application bootup.
A user with ROLE_ADMIN only has this role and it is not inheriting the ROLE_USER.
Steps To Reproduce
You can clone
If you want to generate the Grails 4 code, follow tutorial https://grails.github.io/grails-spring-security-core/4.0.x/index.html#tutorials until step 26.1.8.8
Change the SecureController class to print the user roles.
SecureController.groovy
Test fail
Add the following line to application.groovy a simple role hierarchy. Note there is no spaces arround the ">" symbol.
Run the application (grails run-app) and go to http://localhost:8080/secure and log with me / password. It shows:
when te expected value should be
Test with spaces
Change the hierarchy configuration on application.groovy to have spaces arround the ">"
Run the application (grails run-app) and go to http://localhost:8080/secure and log with me / password. Now it shows the correct values:
Environment Information
Example Application
https://github.com/fjloma/grails4-spring-security-test
Version
4.0.13
The text was updated successfully, but these errors were encountered: