Comments (8)
to reproduce this with your example, you have to add a toString
method that may return null, as mentioned in #56 (comment):
diff --git a/grails-app/domain/com/testapp/User.groovy b/grails-app/domain/com/testapp/User.groovy
index aacd5d0..235d48c 100644
--- a/grails-app/domain/com/testapp/User.groovy
+++ b/grails-app/domain/com/testapp/User.groovy
@@ -52,4 +52,9 @@ class User implements Serializable {
static mapping = {
password column: '`password`'
}
+
+ @Override
+ public String toString() {
+ return username
+ }
}
from grails-spring-security-ui.
By major coincidence, I ran into the exact same issue with the exact same versions of grails and the two plugins today. @mickdavis: I feel your pain.
from grails-spring-security-ui.
I think I found the issue. Spring-security-ui does not like it when the "Person" and "Role" domain objects (see http://grails-plugins.github.io/grails-spring-security-core/v2/guide/domainClasses.html#personClass) return null in their "toString" methods.
So my solution was to change
String toString() {
return this.username
}
to
String toString() {
return this.username ?: 'Person without username'
}
(this is for the Person
class, but I had to update the Role
class accordingly).
from grails-spring-security-ui.
Btw. I think the issue is still a bug in spring-security-ui, I will probably create a pull request soon.
from grails-spring-security-ui.
@marvinthepa - your patch - can't get it working.
Can't get an override - I'll need to rebuild the entire plugin and use that one from a local repo vs just being able to override it somehow?
Was also trying to get my subclassed usercontroller to work in a namespace, but if the namespace is different from the parent class, that seems like it won't work either... (or would it?)
(the toString() stuff didn't work for me, unfortunately)
Thanks for your potential patch :)
from grails-spring-security-ui.
@mgkimsal: I don't know if you can override taglibs. Building the plugin yourself from source will definitely work.
If fixing your toString
in your person and role domain objects didn't help, I suspect you are experiencing a different problem. I might be able to tell if you share the stacktrace that you see.
from grails-spring-security-ui.
@mickdavis @marvinthepa
I have been unable to reproduce this issue with:
compile "org.grails.plugins:spring-security-core:2.0.0"
compile "org.grails.plugins:spring-security-ui:1.0-RC3"
using grails-2.5.6
and java 8u144-zulu
Here's a link to a video demonstrating it working:
https://goo.gl/jCpiQS
and here's the test app I created:
security-ui_issue-56.zip
Are you able to provide a test app which reproduces the issue?
Thanks!
from grails-spring-security-ui.
Thanks @ddelponte for fixing this
from grails-spring-security-ui.
Related Issues (20)
- Create the default role specified in config during registration if it doesn't exist HOT 1
- bump up spring security core Version to 3.2.3
- Feature request: Add Challenge Questions to the Tabs when a User Search is Preformed HOT 1
- Saving a User with no Roles leaves the tab blank HOT 2
- Removing a Role throws an execption HOT 1
- Verifying a new user account does not unlock that account. HOT 6
- Does not behave well with Postgresql datasource configuration HOT 2
- In a Grails multi-project, there are errors when the User/Role domain classes are in a separate plugin subproject HOT 4
- Grails 4 Compatibility HOT 2
- User update removes all user roles (removeUserRole A bug has occurred to remove all user-roles) HOT 7
- Feature Request: tokenExpiration for RegistrationCode instances
- new users are not unlocked upon finishing the registration HOT 1
- Add support for role groups
- Flaws in Spring Security UI Plugin - Reference Documentation HOT 1
- Add/Remove Role from an User gives error when SpringSecurityCore classes are customized
- No plugin [spring-security-ui-1.0-RC3] installed, cannot uninstall HOT 1
- JDK 17 - Spring Security UI 4.0.0.M1 (Latest) "Failed to compile s2ui-override.groovy" HOT 2
- Dependency Dashboard
- Grails 6 support
- Create an issue template similar to what is used in the grails-data-mapping plugin HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grails-spring-security-ui.