Ignore:
Timestamp:
Mar 25, 2009, 4:26:43 AM (16 years ago)
Author:
gav
Message:

More detailing on Task and Entry. Added another authorisation ROLE_Manager and view to go with it. Work on PersonController? delete action.

Location:
trunk/src/grails-app/controllers
Files:
1 added
2 edited

Legend:

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

    r73 r91  
    4242    }
    4343
     44    @Secured(['ROLE_Manager'])   
     45    def manager = {
     46    }
    4447
    4548    @Secured(['ROLE_AppAdmin'])   
  • trunk/src/grails-app/controllers/PersonController.groovy

    r73 r91  
    11import org.codehaus.groovy.grails.plugins.springsecurity.Secured
    22
    3 @Secured(['ROLE_AppAdmin'])
     3@Secured(['ROLE_AppAdmin', 'ROLE_Manager'])
    44class PersonController {
    55
     
    5353                                //first, delete this person from Persons_Authorities table.
    5454                                Authority.findAll().each { it.removeFromPersons(person) }
    55                                 person.delete()
    56                                 flash.message = "Person $params.id deleted."
     55               
     56//                 try {
     57                    person.delete(flush:true)
     58                    flash.message = "Person $params.id deleted."
     59//                 }
     60//                 catch(Exception e) {
     61//                     flash.message = "Could not delete '$person.loginName' due to database constraints, but all authorities have been removed."
     62//                     redirect action: edit, id: person.id
     63//                 }
     64
    5765                        }
    5866                }
Note: See TracChangeset for help on using the changeset viewer.