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.

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

bobby said: 2012.01.15 08:09

@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.

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.

@Mahboob, Please ask this specific code issue on the Grails user list as it’s outside the scope of this screencast. Thanks!

Steve said: 2012.01.18 04:18

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?

bobby said: 2012.02.13 08:13

@batman, thanks for the feedback. Glad you liked it. I forgot to post the code, but I’m planning an extension screen-cast to add more security features and I’ll make sure I post the code for that one (which will also have everything from this one).

Hi, I see you are using a TextEditor. Can you debug a Grails app with Textmate or SublimeText 2?

Is working with a text editor and the command line the most popular way to develop an app with Grails 2?

bobby said: 2012.04.23 18:03

@Olivier I like using just a text editor and command line, but I would say it’s probably more common to use an IDE like SpringSource Tool Suite (based on Eclipse) or IntelliJ IDEA.

Chris said: 2012.05.17 12:54

Is there anything special that needs to be done to get the modules in ApplicationResources to render in Internet Explorer? Page loads with Invalid character errors…

bobby said: 2012.05.21 11:39

@Chris No, there shouldn’t be anything special needed for IE. I have not run into any issues specific to IE before. If you seeing weird errors, please post on Mailing List so we can help get them resolved! Thanks.

Bryn said: 2012.07.05 05:55

Great screencast Bobby. Really clear and nicely paced.

Shantanu said: 2012.09.24 22:22

I’m using Grails 2.0.4 and the command ‘grails’ is not recognised in terminal in the directory you specified… is there any solution or am I doing it wrong?