Changeset 627


Ignore:
Timestamp:
Jul 14, 2010, 10:46:04 AM (14 years ago)
Author:
gav
Message:

Allow all mangers to access manager view, appLog view and rebuildTextSearchIndex.

Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/Config.groovy

    r622 r627  
    181181        subItems: [
    182182            [order:10, controller:'appCore', title:'Start', action:'start', isVisible: { true }],
    183             [order:20, controller:'appCore', title:'Manager', action:'manager', isVisible: { authenticateService.ifAnyGranted('ROLE_Manager,ROLE_AppAdmin') }],
     183            [order:20, controller:'appCore', title:'Manager', action:'manager', isVisible: {
     184                    authenticateService.ifAnyGranted('ROLE_AppAdmin,ROLE_Manager,ROLE_TaskManager,ROLE_InventoryManager,ROLE_AssetManager,ROLE_ProductionManager')
     185                }
     186            ],
    184187            [order:30, controller:'appCore', title:'Admin', action:'appAdmin', isVisible: { authenticateService.ifAllGranted('ROLE_AppAdmin') }],
    185188            [order:90, controller:'appCore', title:'Timeout', action:'changeSessionTimeout', isVisible: { params.action == 'changeSessionTimeout' }],
  • trunk/grails-app/controllers/AppCoreController.groovy

    r622 r627  
    132132    * Render the manager view for manager or admin roles.
    133133    */
    134     @Secured(['ROLE_AppAdmin', 'ROLE_Manager'])
     134    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_TaskManager',
     135                        'ROLE_InventoryManager', 'ROLE_AssetManager', 'ROLE_ProductionManager'])
    135136    def manager = {
    136137    }
     
    244245    * Render the application log file.
    245246    */
    246     @Secured(['ROLE_AppAdmin', 'ROLE_Manager'])
     247    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_TaskManager',
     248                        'ROLE_InventoryManager', 'ROLE_AssetManager', 'ROLE_ProductionManager'])
    247249    def appLog = {
    248250        def file = new File(ConfigurationHolder.config.log4j.appenders.appLog.file)
     
    255257    * Rebuild the text search index.
    256258    */
    257     @Secured(['ROLE_AppAdmin', 'ROLE_Manager'])
     259    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_TaskManager',
     260                        'ROLE_InventoryManager', 'ROLE_AssetManager', 'ROLE_ProductionManager'])
    258261    def rebuildTextSearchIndex = {
    259262        InventoryIndexJob.triggerNow(['calledBy':'AppCoreController rebuildTextSearchIndex{}'])
Note: See TracChangeset for help on using the changeset viewer.