Ignore:
Timestamp:
Oct 26, 2009, 3:11:18 PM (15 years ago)
Author:
gav
Message:

Add test and message for no granted authority to LoginController.
Correct belongsTo in Person-PersonGroup? relationship.
Re-generate PersonGroup? controller and views.
Add more help balloon messages for Person and Task.
Default ROLE_AppUser to ON when creating a person.

Location:
trunk/grails-app/controllers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/LoginController.groovy

    r73 r166  
    144144                def username = session[AuthenticationProcessingFilter.SPRING_SECURITY_LAST_USERNAME_KEY]
    145145                def msg = ''
     146        def person = Person.findByLoginName(username)
    146147                def exception = session[AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY]
    147148                if (exception) {
     
    149150                                msg = "[$username] is disabled."
    150151                        }
     152            else if (person.authorities.isEmpty()) {
     153                msg = "[$username] has no GrantedAuthority."
     154            }
    151155                        else {
    152156                                msg = "[$username] wrong username/password."
  • trunk/grails-app/controllers/PersonGroupController.groovy

    r122 r166  
    2727        if(personGroupInstance) {
    2828            try {
    29                 personGroupInstance.delete()
     29                personGroupInstance.delete(flush:true)
    3030                flash.message = "PersonGroup ${params.id} deleted"
    3131                redirect(action:list)
     
    7777        else {
    7878            flash.message = "PersonGroup not found with id ${params.id}"
    79             redirect(action:edit,id:params.id)
     79            redirect(action:list)
    8080        }
    8181    }
Note: See TracChangeset for help on using the changeset viewer.