title: grails spring-security-core/ui creates locked user accounts by default
body: <p>I am building a simple grails app that does not have access to email. However <code>spring-security-core</code> creates users whose <code>ACCOUNT_LOCKED</code> property is set to <code>TRUE</code> by default. This means that such users can never login because they cannot unlock their accounts.</p>
  
  <p>Is there a simple fix for this behaviour?</p>
  
  <p>Here is my <code>User</code> class:</p>
  
  <pre><code>import groovy.transform.EqualsAndHashCode
  import groovy.transform.ToString
  import grails.compiler.GrailsCompileStatic
  
  @GrailsCompileStatic
  @EqualsAndHashCode(includes='username')
  @ToString(includes='username', includeNames=true, includePackage=false)
  class User implements Serializable {
  
      private static final long serialVersionUID = 1
  
      String username
      String password
      boolean enabled = true
      boolean accountExpired
      boolean accountLocked
      boolean passwordExpired
  
      Set&lt;Role&gt; getAuthorities() {
          (UserRole.findAllByUser(this) as List&lt;UserRole&gt;)*.role as Set&lt;Role&gt;
      }
  
      static constraints = {
          password nullable: false, blank: false, password: true
          username nullable: false, blank: false, unique: true
      }
  
      static mapping = {
          password column: '`password`'
      }
  }
  </code></pre>
  
  <p>I have tried initializing <code>accountLocked</code> to <code>false</code> but to no avail.</p>