Ignore:
Timestamp:
Jan 25, 2010, 2:14:48 PM (14 years ago)
Author:
gav
Message:

Set base authorisations on all controllers.

File:
1 edited

Legend:

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

    r290 r298  
    22import org.codehaus.groovy.grails.commons.ConfigurationHolder
    33
     4@Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager'])
    45class AssetDetailedController extends BaseController {
    56
     
    910    def assetService
    1011
    11     def index = { redirect(action:overview,params:params) }
    12 
    1312    // the delete, save and update actions only accept POST requests
    1413    static allowedMethods = [delete:'POST', save:'POST', update:'POST', saveCopy:'POST']
    1514
     15    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
     16    def index = { redirect(action:overview,params:params) }
     17
     18    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
    1619    def overview = {
    1720    }
    1821
    19     @Secured(['ROLE_Manager','ROLE_AppAdmin'])
    2022    def importAssetTree = {
    2123    }
    2224
    23     @Secured(['ROLE_Manager','ROLE_AppAdmin'])
    2425    def importAssetTreeSave = {
    2526        def result = csvService.importAssetTree(request)
     
    3839    * This does not appear to be a problem once deployed to Tomcat.
    3940    */
     41    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
    4042    def exportAssetTreeTemplate = {
    4143        response.contentType = ConfigurationHolder.config.grails.mime.types["csv"]
     
    4547    }
    4648
     49    /**
     50    * Export the entire asset tree.
     51    */
     52    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
    4753    def exportAssetTree = {
    4854
     
    5561    }
    5662
     63    /**
     64    * List action.
     65    */
     66    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
    5767    def list = {
    5868        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
     
    6070    }
    6171
     72    /**
     73    * Search action.
     74    */
     75    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
    6276    def search = {
    6377
     
    158172    } // end search()
    159173
     174    /**
     175    * Show action.
     176    */
     177    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
    160178    def show = {
    161179
     
    173191    }
    174192
     193    /**
     194    * Delete action.
     195    */
    175196    def delete = {
    176197        def assetInstance = Asset.get( params.id )
     
    192213    }
    193214
     215    /**
     216    * Edit action.
     217    */
    194218    def edit = {
    195219
     
    209233    }
    210234
     235    /**
     236    * Update action.
     237    */
    211238    def update = {
    212239        def assetInstance = Asset.get( params.id )
     
    240267    }
    241268
     269    /**
     270    * Create action.
     271    */
    242272    def create = {
    243273        def result = assetService.create(params)
     
    250280    }
    251281
     282    /**
     283    * Copy action.
     284    */
    252285    def copy = {
    253286        def result = assetService.copy(params)
     
    260293    }
    261294
     295    /**
     296    * Save action.
     297    */
    262298    def save = {
    263299        def result = assetService.save(params)
     
    272308    }
    273309
    274 
     310    /**
     311    * Copy save action.
     312    */
    275313    def saveCopy = {
    276314        def result = assetService.saveCopy(params)
Note: See TracChangeset for help on using the changeset viewer.