Index: /trunk/grails-app/controllers/LoginController.groovy =================================================================== --- /trunk/grails-app/controllers/LoginController.groovy (revision 165) +++ /trunk/grails-app/controllers/LoginController.groovy (revision 166) @@ -144,4 +144,5 @@ def username = session[AuthenticationProcessingFilter.SPRING_SECURITY_LAST_USERNAME_KEY] def msg = '' + def person = Person.findByLoginName(username) def exception = session[AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY] if (exception) { @@ -149,4 +150,7 @@ msg = "[$username] is disabled." } + else if (person.authorities.isEmpty()) { + msg = "[$username] has no GrantedAuthority." + } else { msg = "[$username] wrong username/password." Index: /trunk/grails-app/controllers/PersonGroupController.groovy =================================================================== --- /trunk/grails-app/controllers/PersonGroupController.groovy (revision 165) +++ /trunk/grails-app/controllers/PersonGroupController.groovy (revision 166) @@ -27,5 +27,5 @@ if(personGroupInstance) { try { - personGroupInstance.delete() + personGroupInstance.delete(flush:true) flash.message = "PersonGroup ${params.id} deleted" redirect(action:list) @@ -77,5 +77,5 @@ else { flash.message = "PersonGroup not found with id ${params.id}" - redirect(action:edit,id:params.id) + redirect(action:list) } } Index: /trunk/grails-app/domain/Person.groovy =================================================================== --- /trunk/grails-app/domain/Person.groovy (revision 165) +++ /trunk/grails-app/domain/Person.groovy (revision 166) @@ -7,5 +7,5 @@ tasks: Task] - static belongsTo = [Authority, PersonGroup] + static belongsTo = [Authority] Department department Index: /trunk/grails-app/domain/PersonGroup.groovy =================================================================== --- /trunk/grails-app/domain/PersonGroup.groovy (revision 165) +++ /trunk/grails-app/domain/PersonGroup.groovy (revision 166) @@ -6,4 +6,6 @@ static hasMany = [persons : Person] + + static belongsTo = [Person] static constraints = { Index: /trunk/grails-app/i18n/messages.properties =================================================================== --- /trunk/grails-app/i18n/messages.properties (revision 165) +++ /trunk/grails-app/i18n/messages.properties (revision 166) @@ -2,4 +2,20 @@ person.pass.blank=Password cannot be blank person.pass.doesNotMatch=Passwords must match + +person.personGroups=Person Groups +person.personGroups.help=Groups provide no application authorisations and are merely for grouping people for information purposes. Use Ctrl or Shift to select multiple groups. +person.loginName=Login Name +person.loginName.help=This is the id or name that the person will use to login to the application. +person.firstName=First Name +person.firstName.help=The person's real first name. +person.lastName=Last Name +person.lastName.help=The person's real last name. +person.password=Password +person.password.help=The password that the person will use to login to the appllication (should be changed by them later). +person.isActive=Active +person.isActive.help=Disable this to prevent a person logging in to the application. + +person.authorities=Authorities +person.authorities.help=To allow login at least the 'ROLE_AppUser' authority must be given. The 'ROLE_AppAdmin' authority is NOT required for daily use and provides full (read as DANGEROUS) access. entry.duration=Duration @@ -21,8 +37,13 @@ task.leadPerson=Lead Person task.leadPerson.help=The primay contact person. - + taskRecurring.startDate.NotInTheFuture=Please select a start date that is not in the past, or use original date. taskRecurring.startDate=Start Date taskRecurring.startDate.help=The tartget start date for the first auto generated subTask. + +task.primaryAsset=Primary Asset +task.primaryAsset.help=This is the asset that costs will be assigned to. +task.associatedAssets=Associated Assets +task.associatedAssets.help=These assets are to be associated with this task, but costs will not be assigned. default.doesnt.match.message=Property [{0}] of class [{1}] with value [{2}] does not match the required pattern [{3}] Index: /trunk/grails-app/views/person/create.gsp =================================================================== --- /trunk/grails-app/views/person/create.gsp (revision 165) +++ /trunk/grails-app/views/person/create.gsp (revision 166) @@ -32,4 +32,5 @@