Index: trunk/grails-app/controllers/AssetDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/AssetDetailedController.groovy	(revision 318)
+++ trunk/grails-app/controllers/AssetDetailedController.groovy	(revision 325)
@@ -17,7 +17,8 @@
     def index = { redirect(action:search,params:params) }
 
-    def importAssetTree = {
-    }
-
+    /**
+    * Build and return the asset tree response for the AJAX request.
+    */
+    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
     def assetTree = {
         def s = assetTreeService.buildAssetTree(params, session)
@@ -28,8 +29,18 @@
     * Save the asset tree status in the current http session.
     */
+    @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
     def saveAssetTreeStatus = {
         session.assetTreeVisibleBranches = params.assetTreeVisibleBranches
     }
 
+    /**
+    * Disaply the import view.
+    */
+    def importAssetTree = {
+    }
+
+    /**
+    * Handle the import save.
+    */
     def importAssetTreeSave = {
         def result = csvService.importAssetTree(request)
@@ -56,4 +67,7 @@
     }
 
+    /**
+    * Export a csv test file.
+    */
     def exportAssetTreeTest = {
         response.contentType = ConfigurationHolder.config.grails.mime.types["csv"]
@@ -64,5 +78,5 @@
 
     /**
-    * Export the entire asset tree.
+    * Export the entire asset tree as a csv file.
     */
     @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser'])
@@ -92,6 +106,6 @@
     def search = {
 
-        if(session.taskSearchParamsMax)
-            params.max = session.taskSearchParamsMax
+        if(session.assetSearchParamsMax)
+            params.max = session.assetSearchParamsMax
 
         params.max = Math.min( params.max ? params.max.toInteger() : 10,  1000)
