Ignore:
Timestamp:
Oct 9, 2009, 9:47:11 PM (15 years ago)
Author:
gav
Message:

Refactor bootstrap data generation to new CreateDataService?.
Tweak security annotations so that ROLE_AppAdmin gives access to all areas.
Rework DataSource? to allow building of prod and dev WARs.
Include MySQL jdbc connector which is GNU GPL'd and used in the prod WAR.

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

Legend:

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

    r139 r149  
    44
    55    def authenticateService
     6    def createDataService
    67
    78    def index = { redirect(action:start,params:params) }
     
    4546                }
    4647        }
    47     }         
     48    }
    4849
    4950    def changePassword = {
     
    7879                render(view:'changePassword',model:[personInstance:personInstance])
    7980            }
    80                
    81         } 
     81
     82        }
    8283    }
    8384
    84     @Secured(['ROLE_Manager'])   
     85    @Secured(['ROLE_Manager','ROLE_AppAdmin'])
    8586    def manager = {
    8687    }
    8788
    88     @Secured(['ROLE_AppAdmin'])   
     89    @Secured(['ROLE_AppAdmin'])
    8990    def appAdmin = {
    9091    }
    9192
     93    @Secured(['ROLE_AppAdmin'])
     94    def createBaseData = {
     95        createDataService.createBaseData()
     96        redirect(action:appAdmin)
     97    }
     98
     99    @Secured(['ROLE_AppAdmin'])
     100    def createDemoData = {
     101        createDataService.createDemoData()
     102        redirect(action:appAdmin)
     103    }
     104
    92105}
  • trunk/grails-app/controllers/BaseController.groovy

    r71 r149  
    11import org.codehaus.groovy.grails.plugins.springsecurity.Secured
    22
    3 @Secured(['ROLE_AppUser'])
     3@Secured(['ROLE_AppUser', 'ROLE_AppAdmin'])
    44abstract class BaseController {
    55    def whatsit() {
  • trunk/grails-app/controllers/PersonController.groovy

    r147 r149  
    11import org.codehaus.groovy.grails.plugins.springsecurity.Secured
    22
    3 @Secured(['ROLE_Manager'])
     3@Secured(['ROLE_Manager','ROLE_AppAdmin'])
    44class PersonController extends BaseAppAdminController {
    55
Note: See TracChangeset for help on using the changeset viewer.