- HOME
- About
- rss feed
A very opinionated web log about all sorts of stuff
Do you hate reading? Well today is your lucky day because instead of reading a post, you can watch my first ever Grails screen-cast! It’s definitely a little rough around the edges though and you’ll have to watch it full-screen otherwise the text will be too small.
The topic is “Jumping into Grails 2.0″ using the spring-security-core and resources plugins as well as some unit testing. Please let me know in the comments if you find the screen-cast valuable or not.
Great intro to version 2. Thanks.
Great – I’ve learnt a few things from your screencast. Thanks.
Very cool – thanks for the effort! I’ve also learned a lot. Could I submit a wish for an ACL tutorial? Thanks – Michael
Thank you very much. Awesome work! Your intro to spring security convinced me to persue this avenue in my grails project.
Good stuff! Keep ‘em coming Bobby.
any chance of posting the code. i have poor vision.
thanks
Great screencast, very informative and nicely paced. If not already in the works, would be great to have it linked to from the Grails screencasts page at grails.org/Grails+Screencasts.
[...] Bobby Warner’s published a great screencast this week on using Grails 2.0 and Spring Security – Jump Into Grails 2.0 [...]
[...] Bobby Warner ha pubblicato uno splendido screencast questa settimana su come usare Grails 2.0 e Spring Security – Jump Into Grails 2.0 [...]
@Michael, Sure, I can look into doing an ACL screencast at some point in the future.
@Ray, Sure, I can put the code on GitHub if you’d like. I’ll update the post with the GitHub repo URL when I have it up there.
@John, I tried to put in on the grails.org screencast past, but ran into an issue with the form. I posted to the Grails mailing list and hopefully I’ll be able to put them up there soon. Thanks!
[...] Jump Into Grails 2.0 [...]
Hi Bobby,
Many thanks for your great posts on this site.
Where I really need help is -
I want to add User Registration and Forgot Password functionality to my login module. I have followed your previous screencast and built the login functionality using grails spring-security-core.
The grails spring-security-ui didn’t work for me. With grails 2.0 spring-security-ui does not render the login button, and with grails 1.3.7, it renders an extra button. I don’t want to go back to grails 1.3.7 just to make spring-security-ui work and then land up with a shabby extra button.
So, what would work for me is to just pull out the “User Registration” and “Forgot Password” functionality out of spring-security-ui and latch it to my project. As a starter, if you could provide what files I need, it will be very helpful. Probably you could do a screen cast on this issue.
I’m thinking that there will be many people in my situation. For all of us, what I am requesting you will be a work around until a bug-free, robust spring-security-ui plugin is released.
Cheers,
– MH
@Mahboob I’ll think about possibly doing an additional screencast on security in the future as there was a request for the ACL plugin too.
Specifically for your question about spring-security-ui, you will want to look at this code: https://github.com/grails-plugins/grails-spring-security-ui/blob/master/grails-app/controllers/grails/plugins/springsecurity/ui/RegisterController.groovy
@John, All my screencasts are now up on grails.org. There also is going to be an update to the site to fix the error I was facing.
Hi Bobby,
I took the RegisterController.groovy as per your suggestion, and noted the dependent files as:
AbstractS2UiController.groovy
RegistrationCode.groovy
messages.spring-security-ui.properties
DefaultUiSecurityConfig.groovy
I created the correct directory structure in my project as per the package declarations, and saved the files in those directories.
grails throws the following error:
No signature of method: groovy.util.ConfigObject.contains() is applicable for argument types: (java.lang.String) values: [$]
Possible solutions: containsKey(java.lang.Object), containsKey(java.lang.Object), toString(), toString(), toString(), toString(). Stacktrace follows:
Message: No signature of method: groovy.util.ConfigObject.contains() is applicable for argument types: (java.lang.String) values: [$]
Possible solutions: containsKey(java.lang.Object), containsKey(java.lang.Object), toString(), toString(), toString(), toString()
Line | Method
->> 138 | doCall in grails.plugins.springsecurity.ui.RegisterController$_closure4
Line 138 of RegisterController.groovy is an if condition:
def conf = SpringSecurityUtils.securityConfig
def body = conf.ui.forgotPassword.emailBody
if (body.contains(‘$’)) {
How do I fix this error?
Cheers,
– MH
@Mahboob, Please ask this specific code issue on the Grails user list as it’s outside the scope of this screencast. Thanks!
This was fantastic… I wish it had been around a month ago when I started into spring security and grails for the first time with no idea what I was doing, and some vague pointers from people who’d used Grails 1.3. Thanks heaps
great article – thanks bobby. i’m just starting out with grails, and this is an excellent resource for me.
btw – did you ever get around to posting the source code?
Switch to our mobile site
20 comments so far
Add Your Comment