grailsgrails-2.3

Spring UI - Overriding RegisterController password settings


I am using grails 2.3.4 with ':spring-security-core:2.0-RC2' and ":spring-security-ui:1.0-RC1".

I have my RegisterController ,which looks like that:

import grails.plugin.springsecurity.annotation.Secured;

    @Secured(['permitAll'])
    class RegisterController extends grails.plugin.springsecurity.ui.RegisterController {

    }

I wanted to change the password settings by adding this at the end to my config.groovy:

//password validation of RegisterController.groovy
grails.plugin.springsecurity.ui.password.validationRegex='^([a-zA-Z0-9])$'
grails.plugin.springsecurity.ui.password.minLength=8
grails.plugin.springsecurity.ui.password.maxLength=64

However, nothing has changed yet. I still get the same message when running my app.

Any recommendations what could be wrong?

UPDATE

Even though using this settings: Password is: Test123@

enter image description here

I cannot create a user. Any recommendations how to fix this issue?


Solution

  • Your settings are correct and should work.

    Reading your questions, you say that the message is still the same. Is the validation still the same? Because the message should be set in the i18n files with the message code

    command.password.error.strength  
    

    If it's only the message, this should do it.