Changeset 325


Ignore:
Timestamp:
Feb 8, 2010, 3:43:08 AM (14 years ago)
Author:
gav
Message:

Allow ROLE_AssetUser to view the asset tree.
Some commenting and correct taskSearchParamsMax to assetSearchParamsMax.

File:
1 edited

Legend:

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

    r318 r325  
    1717    def index = { redirect(action:search,params:params) }
    1818
    19     def importAssetTree = {
    20     }
    21 
     19    /**
     20    * Build and return the asset tree response for the AJAX request.
     21    */
     22    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
    2223    def assetTree = {
    2324        def s = assetTreeService.buildAssetTree(params, session)
     
    2829    * Save the asset tree status in the current http session.
    2930    */
     31    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
    3032    def saveAssetTreeStatus = {
    3133        session.assetTreeVisibleBranches = params.assetTreeVisibleBranches
    3234    }
    3335
     36    /**
     37    * Disaply the import view.
     38    */
     39    def importAssetTree = {
     40    }
     41
     42    /**
     43    * Handle the import save.
     44    */
    3445    def importAssetTreeSave = {
    3546        def result = csvService.importAssetTree(request)
     
    5667    }
    5768
     69    /**
     70    * Export a csv test file.
     71    */
    5872    def exportAssetTreeTest = {
    5973        response.contentType = ConfigurationHolder.config.grails.mime.types["csv"]
     
    6478
    6579    /**
    66     * Export the entire asset tree.
     80    * Export the entire asset tree as a csv file.
    6781    */
    6882    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
     
    92106    def search = {
    93107
    94         if(session.taskSearchParamsMax)
    95             params.max = session.taskSearchParamsMax
     108        if(session.assetSearchParamsMax)
     109            params.max = session.assetSearchParamsMax
    96110
    97111        params.max = Math.min( params.max ? params.max.toInteger() : 10,  1000)
Note: See TracChangeset for help on using the changeset viewer.