-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User update removes all user roles (removeUserRole A bug has occurred to remove all user-roles) #114
Comments
Hi @yuan574954352 and thank-you for submitting this issue! Would you be so kind as to link to or attach a sample app as well as include the steps one must follow in order to reproduce the issue? Thanks! |
Closing. Unable to reproduce. This may be related to #89 which was previously resolved. The reported issue does not specify the version of the plugin being utilized. |
Hi @ddelponte - I seem to be seeing this bug in Grails 4.0.2, I've created an example project with steps to reproduce: |
@sk8geek, I am also seeing this bug; I'm using Grails 4.0.11, with S2UI 4.0.0.M1, Hibernate 5.4.18.Final, GORM 7.0.8.RELEASE, and Postgres 12.7. I ran each option in The bug appears when logged in as an admin user, then editing any other user, unchecking any Role checkbox(es), and clicking Update; all UserRoles are deleted from the database. @ddelponte, would it make sense to reopen this, since Steven and I are both experiencing it (and he's provided a sample app)? I stumbled across a workaround while troubleshooting; though it's unlikely be helpful in resolving the bug, as I cannot (yet?) explain why it works, perhaps it will help others running into this bug: I extended Here's the code involved: Create
Add the bean override to
I had to specify these dependencies because auto-wiring didn't work, causing NPEs -- based on a suggestion from Burt Beckwith [https://stackoverflow.com/a/7135267](for a similar problem). Commenting-out the copied method causes the bug to occur as before, deleting all UserRoles instead of just the specified one(s), though I can't see why. @sk8geek, if you have time to try this, it'd be great to have confirmation and/or ideas as to what's going on. |
You should use GORM Hibernate5 7.1.0-M5 with Grails 5. |
My mistake, @puneetbehl -- it's the Hibernate plugin whose version is |
There is a similar issue raised for the Spring Security Core plugin, in case that helps anyone else track down the source. |
I am trying to update my user role information. There is no problem adding a new user role. Once a role is deleted, all user-roles will be deleted.
My solution:
`
package grails.plugin.springsecurity.ui.SpringSecurityUiService 445
`
The text was updated successfully, but these errors were encountered: