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
Click on Roles tab, select a new Role (ex.: ROLE_USER) and click Update
Error is shown on the terminal
You could deselect the ROLE_ADMIN and click Update, an error would apper on the terminal too
Expected Behaviour
New relation with the Role should be saved correctly
OR
Remove the Role from user should work correctly
Actual Behaviour
It throws an exception
When adding a ROLE it shows:
2021-03-08 20:08:50.379 ERROR --- [nio-8080-exec-8] g.p.s.ui.SpringSecurityUiService : Problem in grails.plugin.springsecurity.ui.SpringSecurityUiService@12567611 at "updateUserRoles" with bean MyUser: MyUser(username:admin)
groovy.lang.MissingPropertyException: No such property: user for class: testapp.MyUserMyRole
Possible solutions: myUser
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:65)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:498)
at grails.plugin.springsecurity.ui.SpringSecurityUiService$__tt__addUserRoles_closure48.doCall(SpringSecurityUiService.groovy:413)
...
When removing a ROLE it shows:
2021-03-08 20:15:39.006 ERROR --- [nio-8080-exec-2] g.p.s.ui.SpringSecurityUiService : Problem in grails.plugin.springsecurity.ui.SpringSecurityUiService@70cbe827 at "updateUserRoles" with bean MyUser: MyUser(username:admin)
groovy.lang.MissingPropertyException: No such property: user for class: org.grails.datastore.gorm.query.criteria.AbstractDetachedCriteria
at org.grails.datastore.gorm.query.criteria.AbstractDetachedCriteria.propertyMissing(AbstractDetachedCriteria.groovy:998)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
at groovy.lang.MetaClassImpl.invokeMissingProperty(MetaClassImpl.java:880)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1868)
at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3797)
at org.grails.datastore.gorm.query.criteria.AbstractDetachedCriteria.getProperty(AbstractDetachedCriteria.groovy)
at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:190)
at groovy.lang.Closure.getPropertyTryThese(Closure.java:313)
at groovy.lang.Closure.getPropertyDelegateFirst(Closure.java:303)
at groovy.lang.Closure.getProperty(Closure.java:288)
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:309)
at grails.plugin.springsecurity.ui.SpringSecurityUiService$__tt__removeUserRole_closure49.doCall(SpringSecurityUiService.groovy:446)
...
Environment Information
Operating System: Ubuntu on Windows Subsystem for Linux (WSL)
The text was updated successfully, but these errors were encountered:
tadeubas
changed the title
[WIP]Add/Remove Role from an User gives error when SpringSecurityCore classes are customized
Add/Remove Role from an User gives error when SpringSecurityCore classes are customized
Mar 8, 2021
tadeubas
added a commit
to tadeubas/grails-spring-security-ui
that referenced
this issue
Mar 8, 2021
I've customized the following configs on Grails SpringSecurityCore Plugin:
Then on Grails SpringSecurityUI Plugin when I add/remove a Role from a User and it throws an exception.
Steps to Reproduce
mkdir testapp
cd testapp
grails create-app
grails s2-quickstart testapp MyUser MyRole
grails r-a
http://localhost:8080/#/auth
Expected Behaviour
New relation with the Role should be saved correctly
OR
Remove the Role from user should work correctly
Actual Behaviour
It throws an exception
When adding a ROLE it shows:
When removing a ROLE it shows:
Environment Information
Example Application
https://github.com/tadeubas/grails4-spring-security-example
The text was updated successfully, but these errors were encountered: