- Timestamp:
- Jan 25, 2010, 2:14:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/AssetDetailedController.groovy
r290 r298 2 2 import org.codehaus.groovy.grails.commons.ConfigurationHolder 3 3 4 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager']) 4 5 class AssetDetailedController extends BaseController { 5 6 … … 9 10 def assetService 10 11 11 def index = { redirect(action:overview,params:params) }12 13 12 // the delete, save and update actions only accept POST requests 14 13 static allowedMethods = [delete:'POST', save:'POST', update:'POST', saveCopy:'POST'] 15 14 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']) 16 19 def overview = { 17 20 } 18 21 19 @Secured(['ROLE_Manager','ROLE_AppAdmin'])20 22 def importAssetTree = { 21 23 } 22 24 23 @Secured(['ROLE_Manager','ROLE_AppAdmin'])24 25 def importAssetTreeSave = { 25 26 def result = csvService.importAssetTree(request) … … 38 39 * This does not appear to be a problem once deployed to Tomcat. 39 40 */ 41 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 40 42 def exportAssetTreeTemplate = { 41 43 response.contentType = ConfigurationHolder.config.grails.mime.types["csv"] … … 45 47 } 46 48 49 /** 50 * Export the entire asset tree. 51 */ 52 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 47 53 def exportAssetTree = { 48 54 … … 55 61 } 56 62 63 /** 64 * List action. 65 */ 66 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 57 67 def list = { 58 68 params.max = Math.min( params.max ? params.max.toInteger() : 10, 100) … … 60 70 } 61 71 72 /** 73 * Search action. 74 */ 75 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 62 76 def search = { 63 77 … … 158 172 } // end search() 159 173 174 /** 175 * Show action. 176 */ 177 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_AssetManager', 'ROLE_AssetUser']) 160 178 def show = { 161 179 … … 173 191 } 174 192 193 /** 194 * Delete action. 195 */ 175 196 def delete = { 176 197 def assetInstance = Asset.get( params.id ) … … 192 213 } 193 214 215 /** 216 * Edit action. 217 */ 194 218 def edit = { 195 219 … … 209 233 } 210 234 235 /** 236 * Update action. 237 */ 211 238 def update = { 212 239 def assetInstance = Asset.get( params.id ) … … 240 267 } 241 268 269 /** 270 * Create action. 271 */ 242 272 def create = { 243 273 def result = assetService.create(params) … … 250 280 } 251 281 282 /** 283 * Copy action. 284 */ 252 285 def copy = { 253 286 def result = assetService.copy(params) … … 260 293 } 261 294 295 /** 296 * Save action. 297 */ 262 298 def save = { 263 299 def result = assetService.save(params) … … 272 308 } 273 309 274 310 /** 311 * Copy save action. 312 */ 275 313 def saveCopy = { 276 314 def result = assetService.saveCopy(params)
Note: See TracChangeset
for help on using the changeset viewer.