(Quick Reference)

3 Configuration - Reference Documentation

Authors: Sudhir Nimavat

Version: 0.5.2

3 Configuration

Nimble configuration is devided into two files, DefaultNimbleConfig.groovy which is packaged inside plugin and NimbleConfig.groovy which resides into conf directory of host application. Values in DefaultNimbleConfig.groovy are all considered to be sensible defaults for most usage of Nimble, however all of these values an be overridden by simply redefining them in NimbleConfig.groovy

3.1 Configuring table names

It is possible to change the table names for domain classes provided by nimble.

Currently the following Nimble domain classes have been setup to utilize configurable table names

  1. User
  2. Profile
  3. Role
  4. Group
  5. Permission
  6. LevelPermission
  7. LoginRecord
  8. Url

Default table names specified in DefaultNimbleConfig.groovy is as below:

  1. user = "_user"
  2. role = "_role"
  3. group = "_group"
  4. profilebase = "profile_base"
  5. loginrecord = "login_record"
  6. permission = "permission"
  7. levelpermission = "level_permission"
  8. url = "url"

You can change default table names by overriding it in conf/NimbleConfig.groovy as shown below:

nimble {
  tablenames {
    user =  "user_master"
    role =  "role_master"
    group =  "group_master"

You don't have to override all table names, you can choose to override just selected.

3.2 User account configuration

You can configure things like whether to allow new user registration, username requirements, and whether new user account is enabled after successful registration as shown below.

  localusers {
    usernames {
      minlength = 4
      validregex = '[a-zA-Z0-9]*' //regex that should be used for validating username
   provision { active = false } //whether new user accoutn should be enabled or disabled after registration
   registration { enabled = true } //Allow new users to register or now

3.3 Password requirements

Nimble has password requirements for new user registration. Default is as shown below:

  passwords {
    mustcontain {
      lowercase = true
      uppercase = true
      numbers = true
      symbols = true
    minlength = 8

It can be overridden in NimbleConfig.groovy

3.4 Email Settings

Nimble can be configured to send emails for registration, password reset and email address change. By default mails are disabled. It can be configured to enable mails, and subjects of mails.

nimble {
  messaging {
    enabled = true
    registration { subject = "Your new account is ready!" }
    passwordreset { subject = "Your password has been reset" }
    changeemail { subject = "Your email address has been changed" }

Nimble depends on Grails for sending mails. You must configure mail plugin properly if you enable messaging in nimble.

3.5 UI Layout

Default layouts used by nimble views can be changed as shown below:

nimble {
  layout {
    application = 'app' 
    administration = 'admin' //layout used by nimble administration portal.