installing spring security ui plugin

steps to be performed for grails 1.3.7
  1. grails install-plugin spring-security-core
  2. grails s2-quickstart com.myApp SecUser SecRole
  3. grails install-plugin spring-security-ui
  4. grails s2ui-override auth
  5. grails s2ui-override layout
  6. grails s2ui-override user com.myApp
  7. grails s2ui-override role com.myApp
  8. edit springSecurityUI.gsp which is generated in views/layout
    • add “plugin:’spring-security-ui'” as an attribute of resource of href of link taglib
    • add “plugin=’spring-security-ui'” as an attribute of javascript taglib of jquery resources
    • remove “plugin=’spring-security-ui'” attribute from renderTemplate taglib at bottom
  9. edit _ajaxLogin.gsp template which is generated in views/includes
    • add “plugin=’spring-security-ui'” as an attribure of javascript taglib of jquery.form.js and ajaxLogin.js

for grails 2.0.0 there are more steps to be performed:

  1. edit springSecurityUI.gsp:
  2. edit AbstracS2UIController.groovy of spring-security-ui plugin
    • comment the declaration of grailsApplication property as of  it does not required by grails 2.0 (otherwise exception will be thrown)

~ by ajibrans on February 4, 2012.

4 Responses to “installing spring security ui plugin”

  1. also, in Grails 2.0, you need to add a “String email” in SecUser.
    And edit register.gsp layout.

  2. Also, comment:
    user.password = springSecurityService.encodePassword(params.password, salt)

    for save and edit in plugins/springsecurity/ui/UserControler.groovy

  3. and comment also password encoding in plugins/springsecurity/ui/RegisterControler.groovy

  4. Great post, thank you for the post. I am getting this error.
    Could you please shed some light. Thank you so much!

    org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error applying layout : register

    root cause

    org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag : No module found with name [jquery-ui]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: