Index: trunk/grails-app/controllers/DepartmentController.groovy
===================================================================
--- trunk/grails-app/controllers/DepartmentController.groovy	(revision 286)
+++ 	(revision )
@@ -1,99 +1,0 @@
-import org.codehaus.groovy.grails.plugins.springsecurity.Secured
-
-class DepartmentController extends BaseAppAdminController {
-    
-    def index = { redirect(action:list,params:params) }
-
-    // the delete, save and update actions only accept POST requests
-    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
-
-    def list = {
-        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
-        [ departmentInstanceList: Department.list( params ), departmentInstanceTotal: Department.count() ]
-    }
-
-    def show = {
-        def departmentInstance = Department.get( params.id )
-
-        if(!departmentInstance) {
-            flash.message = "Department not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else { return [ departmentInstance : departmentInstance ] }
-    }
-
-    def delete = {
-        def departmentInstance = Department.get( params.id )
-        if(departmentInstance) {
-            try {
-                departmentInstance.delete(flush:true)
-                flash.message = "Department ${params.id} deleted"
-                redirect(action:list)
-            }
-            catch(org.springframework.dao.DataIntegrityViolationException e) {
-                flash.message = "Department ${params.id} could not be deleted"
-                redirect(action:show,id:params.id)
-            }
-        }
-        else {
-            flash.message = "Department not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def edit = {
-        def departmentInstance = Department.get( params.id )
-
-        if(!departmentInstance) {
-            flash.message = "Department not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else {
-            return [ departmentInstance : departmentInstance ]
-        }
-    }
-
-    def update = {
-        def departmentInstance = Department.get( params.id )
-        if(departmentInstance) {
-            if(params.version) {
-                def version = params.version.toLong()
-                if(departmentInstance.version > version) {
-                    
-                    departmentInstance.errors.rejectValue("version", "department.optimistic.locking.failure", "Another user has updated this Department while you were editing.")
-                    render(view:'edit',model:[departmentInstance:departmentInstance])
-                    return
-                }
-            }
-            departmentInstance.properties = params
-            if(!departmentInstance.hasErrors() && departmentInstance.save(flush: true)) {
-                flash.message = "Department ${params.id} updated"
-                redirect(action:show,id:departmentInstance.id)
-            }
-            else {
-                render(view:'edit',model:[departmentInstance:departmentInstance])
-            }
-        }
-        else {
-            flash.message = "Department not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def create = {
-        def departmentInstance = new Department()
-        departmentInstance.properties = params
-        return ['departmentInstance':departmentInstance]
-    }
-
-    def save = {
-        def departmentInstance = new Department(params)
-        if(!departmentInstance.hasErrors() && departmentInstance.save(flush: true)) {
-            flash.message = "Department ${departmentInstance.id} created"
-            redirect(action:show,id:departmentInstance.id)
-        }
-        else {
-            render(view:'create',model:[departmentInstance:departmentInstance])
-        }
-    }
-}
Index: trunk/grails-app/controllers/DepartmentDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/DepartmentDetailedController.groovy	(revision 288)
+++ trunk/grails-app/controllers/DepartmentDetailedController.groovy	(revision 288)
@@ -0,0 +1,100 @@
+import org.codehaus.groovy.grails.plugins.springsecurity.Secured
+
+@Secured(['ROLE_Manager','ROLE_AppAdmin'])
+class DepartmentDetailedController extends BaseController {
+    
+    def index = { redirect(action:list,params:params) }
+
+    // the delete, save and update actions only accept POST requests
+    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
+
+    def list = {
+        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
+        [ departmentInstanceList: Department.list( params ), departmentInstanceTotal: Department.count() ]
+    }
+
+    def show = {
+        def departmentInstance = Department.get( params.id )
+
+        if(!departmentInstance) {
+            flash.message = "Department not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else { return [ departmentInstance : departmentInstance ] }
+    }
+
+    def delete = {
+        def departmentInstance = Department.get( params.id )
+        if(departmentInstance) {
+            try {
+                departmentInstance.delete(flush:true)
+                flash.message = "Department ${params.id} deleted"
+                redirect(action:list)
+            }
+            catch(org.springframework.dao.DataIntegrityViolationException e) {
+                flash.message = "Department ${params.id} could not be deleted"
+                redirect(action:show,id:params.id)
+            }
+        }
+        else {
+            flash.message = "Department not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def edit = {
+        def departmentInstance = Department.get( params.id )
+
+        if(!departmentInstance) {
+            flash.message = "Department not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else {
+            return [ departmentInstance : departmentInstance ]
+        }
+    }
+
+    def update = {
+        def departmentInstance = Department.get( params.id )
+        if(departmentInstance) {
+            if(params.version) {
+                def version = params.version.toLong()
+                if(departmentInstance.version > version) {
+                    
+                    departmentInstance.errors.rejectValue("version", "department.optimistic.locking.failure", "Another user has updated this Department while you were editing.")
+                    render(view:'edit',model:[departmentInstance:departmentInstance])
+                    return
+                }
+            }
+            departmentInstance.properties = params
+            if(!departmentInstance.hasErrors() && departmentInstance.save(flush: true)) {
+                flash.message = "Department ${params.id} updated"
+                redirect(action:show,id:departmentInstance.id)
+            }
+            else {
+                render(view:'edit',model:[departmentInstance:departmentInstance])
+            }
+        }
+        else {
+            flash.message = "Department not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def create = {
+        def departmentInstance = new Department()
+        departmentInstance.properties = params
+        return ['departmentInstance':departmentInstance]
+    }
+
+    def save = {
+        def departmentInstance = new Department(params)
+        if(!departmentInstance.hasErrors() && departmentInstance.save(flush: true)) {
+            flash.message = "Department ${departmentInstance.id} created"
+            redirect(action:show,id:departmentInstance.id)
+        }
+        else {
+            render(view:'create',model:[departmentInstance:departmentInstance])
+        }
+    }
+}
Index: trunk/grails-app/controllers/DepartmentExtendedAttributeController.groovy
===================================================================
--- trunk/grails-app/controllers/DepartmentExtendedAttributeController.groovy	(revision 286)
+++ 	(revision )
@@ -1,99 +1,0 @@
-import org.codehaus.groovy.grails.plugins.springsecurity.Secured
-
-class DepartmentExtendedAttributeController extends BaseAppAdminController {
-    
-    def index = { redirect(action:list,params:params) }
-
-    // the delete, save and update actions only accept POST requests
-    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
-
-    def list = {
-        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
-        [ departmentExtendedAttributeInstanceList: DepartmentExtendedAttribute.list( params ), departmentExtendedAttributeInstanceTotal: DepartmentExtendedAttribute.count() ]
-    }
-
-    def show = {
-        def departmentExtendedAttributeInstance = DepartmentExtendedAttribute.get( params.id )
-
-        if(!departmentExtendedAttributeInstance) {
-            flash.message = "DepartmentExtendedAttribute not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else { return [ departmentExtendedAttributeInstance : departmentExtendedAttributeInstance ] }
-    }
-
-    def delete = {
-        def departmentExtendedAttributeInstance = DepartmentExtendedAttribute.get( params.id )
-        if(departmentExtendedAttributeInstance) {
-            try {
-                departmentExtendedAttributeInstance.delete(flush:true)
-                flash.message = "DepartmentExtendedAttribute ${params.id} deleted"
-                redirect(action:list)
-            }
-            catch(org.springframework.dao.DataIntegrityViolationException e) {
-                flash.message = "DepartmentExtendedAttribute ${params.id} could not be deleted"
-                redirect(action:show,id:params.id)
-            }
-        }
-        else {
-            flash.message = "DepartmentExtendedAttribute not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def edit = {
-        def departmentExtendedAttributeInstance = DepartmentExtendedAttribute.get( params.id )
-
-        if(!departmentExtendedAttributeInstance) {
-            flash.message = "DepartmentExtendedAttribute not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else {
-            return [ departmentExtendedAttributeInstance : departmentExtendedAttributeInstance ]
-        }
-    }
-
-    def update = {
-        def departmentExtendedAttributeInstance = DepartmentExtendedAttribute.get( params.id )
-        if(departmentExtendedAttributeInstance) {
-            if(params.version) {
-                def version = params.version.toLong()
-                if(departmentExtendedAttributeInstance.version > version) {
-                    
-                    departmentExtendedAttributeInstance.errors.rejectValue("version", "departmentExtendedAttribute.optimistic.locking.failure", "Another user has updated this DepartmentExtendedAttribute while you were editing.")
-                    render(view:'edit',model:[departmentExtendedAttributeInstance:departmentExtendedAttributeInstance])
-                    return
-                }
-            }
-            departmentExtendedAttributeInstance.properties = params
-            if(!departmentExtendedAttributeInstance.hasErrors() && departmentExtendedAttributeInstance.save(flush: true)) {
-                flash.message = "DepartmentExtendedAttribute ${params.id} updated"
-                redirect(action:show,id:departmentExtendedAttributeInstance.id)
-            }
-            else {
-                render(view:'edit',model:[departmentExtendedAttributeInstance:departmentExtendedAttributeInstance])
-            }
-        }
-        else {
-            flash.message = "DepartmentExtendedAttribute not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def create = {
-        def departmentExtendedAttributeInstance = new DepartmentExtendedAttribute()
-        departmentExtendedAttributeInstance.properties = params
-        return ['departmentExtendedAttributeInstance':departmentExtendedAttributeInstance]
-    }
-
-    def save = {
-        def departmentExtendedAttributeInstance = new DepartmentExtendedAttribute(params)
-        if(!departmentExtendedAttributeInstance.hasErrors() && departmentExtendedAttributeInstance.save(flush: true)) {
-            flash.message = "DepartmentExtendedAttribute ${departmentExtendedAttributeInstance.id} created"
-            redirect(action:show,id:departmentExtendedAttributeInstance.id)
-        }
-        else {
-            render(view:'create',model:[departmentExtendedAttributeInstance:departmentExtendedAttributeInstance])
-        }
-    }
-}
Index: trunk/grails-app/controllers/DepartmentExtendedAttributeDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/DepartmentExtendedAttributeDetailedController.groovy	(revision 288)
+++ trunk/grails-app/controllers/DepartmentExtendedAttributeDetailedController.groovy	(revision 288)
@@ -0,0 +1,100 @@
+import org.codehaus.groovy.grails.plugins.springsecurity.Secured
+
+@Secured(['ROLE_Manager','ROLE_AppAdmin'])
+class DepartmentExtendedAttributeDetailedController extends BaseController {
+
+    def index = { redirect(action:list,params:params) }
+
+    // the delete, save and update actions only accept POST requests
+    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
+
+    def list = {
+        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
+        [ departmentExtendedAttributeInstanceList: DepartmentExtendedAttribute.list( params ), departmentExtendedAttributeInstanceTotal: DepartmentExtendedAttribute.count() ]
+    }
+
+    def show = {
+        def departmentExtendedAttributeInstance = DepartmentExtendedAttribute.get( params.id )
+
+        if(!departmentExtendedAttributeInstance) {
+            flash.message = "DepartmentExtendedAttribute not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else { return [ departmentExtendedAttributeInstance : departmentExtendedAttributeInstance ] }
+    }
+
+    def delete = {
+        def departmentExtendedAttributeInstance = DepartmentExtendedAttribute.get( params.id )
+        if(departmentExtendedAttributeInstance) {
+            try {
+                departmentExtendedAttributeInstance.delete(flush:true)
+                flash.message = "DepartmentExtendedAttribute ${params.id} deleted"
+                redirect(action:list)
+            }
+            catch(org.springframework.dao.DataIntegrityViolationException e) {
+                flash.message = "DepartmentExtendedAttribute ${params.id} could not be deleted"
+                redirect(action:show,id:params.id)
+            }
+        }
+        else {
+            flash.message = "DepartmentExtendedAttribute not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def edit = {
+        def departmentExtendedAttributeInstance = DepartmentExtendedAttribute.get( params.id )
+
+        if(!departmentExtendedAttributeInstance) {
+            flash.message = "DepartmentExtendedAttribute not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else {
+            return [ departmentExtendedAttributeInstance : departmentExtendedAttributeInstance ]
+        }
+    }
+
+    def update = {
+        def departmentExtendedAttributeInstance = DepartmentExtendedAttribute.get( params.id )
+        if(departmentExtendedAttributeInstance) {
+            if(params.version) {
+                def version = params.version.toLong()
+                if(departmentExtendedAttributeInstance.version > version) {
+                    
+                    departmentExtendedAttributeInstance.errors.rejectValue("version", "departmentExtendedAttribute.optimistic.locking.failure", "Another user has updated this DepartmentExtendedAttribute while you were editing.")
+                    render(view:'edit',model:[departmentExtendedAttributeInstance:departmentExtendedAttributeInstance])
+                    return
+                }
+            }
+            departmentExtendedAttributeInstance.properties = params
+            if(!departmentExtendedAttributeInstance.hasErrors() && departmentExtendedAttributeInstance.save(flush: true)) {
+                flash.message = "DepartmentExtendedAttribute ${params.id} updated"
+                redirect(action:show,id:departmentExtendedAttributeInstance.id)
+            }
+            else {
+                render(view:'edit',model:[departmentExtendedAttributeInstance:departmentExtendedAttributeInstance])
+            }
+        }
+        else {
+            flash.message = "DepartmentExtendedAttribute not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def create = {
+        def departmentExtendedAttributeInstance = new DepartmentExtendedAttribute()
+        departmentExtendedAttributeInstance.properties = params
+        return ['departmentExtendedAttributeInstance':departmentExtendedAttributeInstance]
+    }
+
+    def save = {
+        def departmentExtendedAttributeInstance = new DepartmentExtendedAttribute(params)
+        if(!departmentExtendedAttributeInstance.hasErrors() && departmentExtendedAttributeInstance.save(flush: true)) {
+            flash.message = "DepartmentExtendedAttribute ${departmentExtendedAttributeInstance.id} created"
+            redirect(action:show,id:departmentExtendedAttributeInstance.id)
+        }
+        else {
+            render(view:'create',model:[departmentExtendedAttributeInstance:departmentExtendedAttributeInstance])
+        }
+    }
+}
Index: trunk/grails-app/controllers/ExtendedAttributeTypeController.groovy
===================================================================
--- trunk/grails-app/controllers/ExtendedAttributeTypeController.groovy	(revision 286)
+++ 	(revision )
@@ -1,99 +1,0 @@
-import org.codehaus.groovy.grails.plugins.springsecurity.Secured
-
-class ExtendedAttributeTypeController extends BaseAppAdminController {
-    
-    def index = { redirect(action:list,params:params) }
-
-    // the delete, save and update actions only accept POST requests
-    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
-
-    def list = {
-        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
-        [ extendedAttributeTypeInstanceList: ExtendedAttributeType.list( params ), extendedAttributeTypeInstanceTotal: ExtendedAttributeType.count() ]
-    }
-
-    def show = {
-        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
-
-        if(!extendedAttributeTypeInstance) {
-            flash.message = "ExtendedAttributeType not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else { return [ extendedAttributeTypeInstance : extendedAttributeTypeInstance ] }
-    }
-
-    def delete = {
-        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
-        if(extendedAttributeTypeInstance) {
-            try {
-                extendedAttributeTypeInstance.delete(flush:true)
-                flash.message = "ExtendedAttributeType ${params.id} deleted"
-                redirect(action:list)
-            }
-            catch(org.springframework.dao.DataIntegrityViolationException e) {
-                flash.message = "ExtendedAttributeType ${params.id} could not be deleted"
-                redirect(action:show,id:params.id)
-            }
-        }
-        else {
-            flash.message = "ExtendedAttributeType not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def edit = {
-        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
-
-        if(!extendedAttributeTypeInstance) {
-            flash.message = "ExtendedAttributeType not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else {
-            return [ extendedAttributeTypeInstance : extendedAttributeTypeInstance ]
-        }
-    }
-
-    def update = {
-        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
-        if(extendedAttributeTypeInstance) {
-            if(params.version) {
-                def version = params.version.toLong()
-                if(extendedAttributeTypeInstance.version > version) {
-                    
-                    extendedAttributeTypeInstance.errors.rejectValue("version", "extendedAttributeType.optimistic.locking.failure", "Another user has updated this ExtendedAttributeType while you were editing.")
-                    render(view:'edit',model:[extendedAttributeTypeInstance:extendedAttributeTypeInstance])
-                    return
-                }
-            }
-            extendedAttributeTypeInstance.properties = params
-            if(!extendedAttributeTypeInstance.hasErrors() && extendedAttributeTypeInstance.save(flush: true)) {
-                flash.message = "ExtendedAttributeType ${params.id} updated"
-                redirect(action:show,id:extendedAttributeTypeInstance.id)
-            }
-            else {
-                render(view:'edit',model:[extendedAttributeTypeInstance:extendedAttributeTypeInstance])
-            }
-        }
-        else {
-            flash.message = "ExtendedAttributeType not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def create = {
-        def extendedAttributeTypeInstance = new ExtendedAttributeType()
-        extendedAttributeTypeInstance.properties = params
-        return ['extendedAttributeTypeInstance':extendedAttributeTypeInstance]
-    }
-
-    def save = {
-        def extendedAttributeTypeInstance = new ExtendedAttributeType(params)
-        if(!extendedAttributeTypeInstance.hasErrors() && extendedAttributeTypeInstance.save(flush: true)) {
-            flash.message = "ExtendedAttributeType ${extendedAttributeTypeInstance.id} created"
-            redirect(action:show,id:extendedAttributeTypeInstance.id)
-        }
-        else {
-            render(view:'create',model:[extendedAttributeTypeInstance:extendedAttributeTypeInstance])
-        }
-    }
-}
Index: trunk/grails-app/controllers/ExtendedAttributeTypeDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/ExtendedAttributeTypeDetailedController.groovy	(revision 288)
+++ trunk/grails-app/controllers/ExtendedAttributeTypeDetailedController.groovy	(revision 288)
@@ -0,0 +1,100 @@
+import org.codehaus.groovy.grails.plugins.springsecurity.Secured
+
+@Secured(['ROLE_Manager','ROLE_AppAdmin'])
+class ExtendedAttributeTypeDetailedController extends BaseController {
+    
+    def index = { redirect(action:list,params:params) }
+
+    // the delete, save and update actions only accept POST requests
+    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
+
+    def list = {
+        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
+        [ extendedAttributeTypeInstanceList: ExtendedAttributeType.list( params ), extendedAttributeTypeInstanceTotal: ExtendedAttributeType.count() ]
+    }
+
+    def show = {
+        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
+
+        if(!extendedAttributeTypeInstance) {
+            flash.message = "ExtendedAttributeType not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else { return [ extendedAttributeTypeInstance : extendedAttributeTypeInstance ] }
+    }
+
+    def delete = {
+        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
+        if(extendedAttributeTypeInstance) {
+            try {
+                extendedAttributeTypeInstance.delete(flush:true)
+                flash.message = "ExtendedAttributeType ${params.id} deleted"
+                redirect(action:list)
+            }
+            catch(org.springframework.dao.DataIntegrityViolationException e) {
+                flash.message = "ExtendedAttributeType ${params.id} could not be deleted"
+                redirect(action:show,id:params.id)
+            }
+        }
+        else {
+            flash.message = "ExtendedAttributeType not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def edit = {
+        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
+
+        if(!extendedAttributeTypeInstance) {
+            flash.message = "ExtendedAttributeType not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else {
+            return [ extendedAttributeTypeInstance : extendedAttributeTypeInstance ]
+        }
+    }
+
+    def update = {
+        def extendedAttributeTypeInstance = ExtendedAttributeType.get( params.id )
+        if(extendedAttributeTypeInstance) {
+            if(params.version) {
+                def version = params.version.toLong()
+                if(extendedAttributeTypeInstance.version > version) {
+                    
+                    extendedAttributeTypeInstance.errors.rejectValue("version", "extendedAttributeType.optimistic.locking.failure", "Another user has updated this ExtendedAttributeType while you were editing.")
+                    render(view:'edit',model:[extendedAttributeTypeInstance:extendedAttributeTypeInstance])
+                    return
+                }
+            }
+            extendedAttributeTypeInstance.properties = params
+            if(!extendedAttributeTypeInstance.hasErrors() && extendedAttributeTypeInstance.save(flush: true)) {
+                flash.message = "ExtendedAttributeType ${params.id} updated"
+                redirect(action:show,id:extendedAttributeTypeInstance.id)
+            }
+            else {
+                render(view:'edit',model:[extendedAttributeTypeInstance:extendedAttributeTypeInstance])
+            }
+        }
+        else {
+            flash.message = "ExtendedAttributeType not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def create = {
+        def extendedAttributeTypeInstance = new ExtendedAttributeType()
+        extendedAttributeTypeInstance.properties = params
+        return ['extendedAttributeTypeInstance':extendedAttributeTypeInstance]
+    }
+
+    def save = {
+        def extendedAttributeTypeInstance = new ExtendedAttributeType(params)
+        if(!extendedAttributeTypeInstance.hasErrors() && extendedAttributeTypeInstance.save(flush: true)) {
+            flash.message = "ExtendedAttributeType ${extendedAttributeTypeInstance.id} created"
+            redirect(action:show,id:extendedAttributeTypeInstance.id)
+        }
+        else {
+            render(view:'create',model:[extendedAttributeTypeInstance:extendedAttributeTypeInstance])
+        }
+    }
+}
Index: trunk/grails-app/controllers/SectionController.groovy
===================================================================
--- trunk/grails-app/controllers/SectionController.groovy	(revision 286)
+++ 	(revision )
@@ -1,99 +1,0 @@
-import org.codehaus.groovy.grails.plugins.springsecurity.Secured
-
-class SectionController extends BaseAppAdminController {
-    
-    def index = { redirect(action:list,params:params) }
-
-    // the delete, save and update actions only accept POST requests
-    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
-
-    def list = {
-        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
-        [ sectionInstanceList: Section.list( params ), sectionInstanceTotal: Section.count() ]
-    }
-
-    def show = {
-        def sectionInstance = Section.get( params.id )
-
-        if(!sectionInstance) {
-            flash.message = "Section not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else { return [ sectionInstance : sectionInstance ] }
-    }
-
-    def delete = {
-        def sectionInstance = Section.get( params.id )
-        if(sectionInstance) {
-            try {
-                sectionInstance.delete(flush:true)
-                flash.message = "Section ${params.id} deleted"
-                redirect(action:list)
-            }
-            catch(org.springframework.dao.DataIntegrityViolationException e) {
-                flash.message = "Section ${params.id} could not be deleted"
-                redirect(action:show,id:params.id)
-            }
-        }
-        else {
-            flash.message = "Section not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def edit = {
-        def sectionInstance = Section.get( params.id )
-
-        if(!sectionInstance) {
-            flash.message = "Section not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else {
-            return [ sectionInstance : sectionInstance ]
-        }
-    }
-
-    def update = {
-        def sectionInstance = Section.get( params.id )
-        if(sectionInstance) {
-            if(params.version) {
-                def version = params.version.toLong()
-                if(sectionInstance.version > version) {
-                    
-                    sectionInstance.errors.rejectValue("version", "section.optimistic.locking.failure", "Another user has updated this Section while you were editing.")
-                    render(view:'edit',model:[sectionInstance:sectionInstance])
-                    return
-                }
-            }
-            sectionInstance.properties = params
-            if(!sectionInstance.hasErrors() && sectionInstance.save(flush: true)) {
-                flash.message = "Section ${params.id} updated"
-                redirect(action:show,id:sectionInstance.id)
-            }
-            else {
-                render(view:'edit',model:[sectionInstance:sectionInstance])
-            }
-        }
-        else {
-            flash.message = "Section not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def create = {
-        def sectionInstance = new Section()
-        sectionInstance.properties = params
-        return ['sectionInstance':sectionInstance]
-    }
-
-    def save = {
-        def sectionInstance = new Section(params)
-        if(!sectionInstance.hasErrors() && sectionInstance.save(flush: true)) {
-            flash.message = "Section ${sectionInstance.id} created"
-            redirect(action:show,id:sectionInstance.id)
-        }
-        else {
-            render(view:'create',model:[sectionInstance:sectionInstance])
-        }
-    }
-}
Index: trunk/grails-app/controllers/SectionDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/SectionDetailedController.groovy	(revision 286)
+++ trunk/grails-app/controllers/SectionDetailedController.groovy	(revision 288)
@@ -1,4 +1,5 @@
 import org.codehaus.groovy.grails.plugins.springsecurity.Secured
 
+@Secured(['ROLE_Manager','ROLE_AppAdmin'])
 class SectionDetailedController extends BaseController {
     
Index: trunk/grails-app/controllers/SectionExtendedAttributeController.groovy
===================================================================
--- trunk/grails-app/controllers/SectionExtendedAttributeController.groovy	(revision 286)
+++ 	(revision )
@@ -1,99 +1,0 @@
-import org.codehaus.groovy.grails.plugins.springsecurity.Secured
-
-class SectionExtendedAttributeController extends BaseAppAdminController {
-    
-    def index = { redirect(action:list,params:params) }
-
-    // the delete, save and update actions only accept POST requests
-    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
-
-    def list = {
-        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
-        [ sectionExtendedAttributeInstanceList: SectionExtendedAttribute.list( params ), sectionExtendedAttributeInstanceTotal: SectionExtendedAttribute.count() ]
-    }
-
-    def show = {
-        def sectionExtendedAttributeInstance = SectionExtendedAttribute.get( params.id )
-
-        if(!sectionExtendedAttributeInstance) {
-            flash.message = "SectionExtendedAttribute not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else { return [ sectionExtendedAttributeInstance : sectionExtendedAttributeInstance ] }
-    }
-
-    def delete = {
-        def sectionExtendedAttributeInstance = SectionExtendedAttribute.get( params.id )
-        if(sectionExtendedAttributeInstance) {
-            try {
-                sectionExtendedAttributeInstance.delete(flush:true)
-                flash.message = "SectionExtendedAttribute ${params.id} deleted"
-                redirect(action:list)
-            }
-            catch(org.springframework.dao.DataIntegrityViolationException e) {
-                flash.message = "SectionExtendedAttribute ${params.id} could not be deleted"
-                redirect(action:show,id:params.id)
-            }
-        }
-        else {
-            flash.message = "SectionExtendedAttribute not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def edit = {
-        def sectionExtendedAttributeInstance = SectionExtendedAttribute.get( params.id )
-
-        if(!sectionExtendedAttributeInstance) {
-            flash.message = "SectionExtendedAttribute not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else {
-            return [ sectionExtendedAttributeInstance : sectionExtendedAttributeInstance ]
-        }
-    }
-
-    def update = {
-        def sectionExtendedAttributeInstance = SectionExtendedAttribute.get( params.id )
-        if(sectionExtendedAttributeInstance) {
-            if(params.version) {
-                def version = params.version.toLong()
-                if(sectionExtendedAttributeInstance.version > version) {
-                    
-                    sectionExtendedAttributeInstance.errors.rejectValue("version", "sectionExtendedAttribute.optimistic.locking.failure", "Another user has updated this SectionExtendedAttribute while you were editing.")
-                    render(view:'edit',model:[sectionExtendedAttributeInstance:sectionExtendedAttributeInstance])
-                    return
-                }
-            }
-            sectionExtendedAttributeInstance.properties = params
-            if(!sectionExtendedAttributeInstance.hasErrors() && sectionExtendedAttributeInstance.save(flush: true)) {
-                flash.message = "SectionExtendedAttribute ${params.id} updated"
-                redirect(action:show,id:sectionExtendedAttributeInstance.id)
-            }
-            else {
-                render(view:'edit',model:[sectionExtendedAttributeInstance:sectionExtendedAttributeInstance])
-            }
-        }
-        else {
-            flash.message = "SectionExtendedAttribute not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def create = {
-        def sectionExtendedAttributeInstance = new SectionExtendedAttribute()
-        sectionExtendedAttributeInstance.properties = params
-        return ['sectionExtendedAttributeInstance':sectionExtendedAttributeInstance]
-    }
-
-    def save = {
-        def sectionExtendedAttributeInstance = new SectionExtendedAttribute(params)
-        if(!sectionExtendedAttributeInstance.hasErrors() && sectionExtendedAttributeInstance.save(flush: true)) {
-            flash.message = "SectionExtendedAttribute ${sectionExtendedAttributeInstance.id} created"
-            redirect(action:show,id:sectionExtendedAttributeInstance.id)
-        }
-        else {
-            render(view:'create',model:[sectionExtendedAttributeInstance:sectionExtendedAttributeInstance])
-        }
-    }
-}
Index: trunk/grails-app/controllers/SectionExtendedAttributeDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/SectionExtendedAttributeDetailedController.groovy	(revision 288)
+++ trunk/grails-app/controllers/SectionExtendedAttributeDetailedController.groovy	(revision 288)
@@ -0,0 +1,100 @@
+import org.codehaus.groovy.grails.plugins.springsecurity.Secured
+
+@Secured(['ROLE_Manager','ROLE_AppAdmin'])
+class SectionExtendedAttributeDetailedController extends BaseController {
+    
+    def index = { redirect(action:list,params:params) }
+
+    // the delete, save and update actions only accept POST requests
+    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
+
+    def list = {
+        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
+        [ sectionExtendedAttributeInstanceList: SectionExtendedAttribute.list( params ), sectionExtendedAttributeInstanceTotal: SectionExtendedAttribute.count() ]
+    }
+
+    def show = {
+        def sectionExtendedAttributeInstance = SectionExtendedAttribute.get( params.id )
+
+        if(!sectionExtendedAttributeInstance) {
+            flash.message = "SectionExtendedAttribute not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else { return [ sectionExtendedAttributeInstance : sectionExtendedAttributeInstance ] }
+    }
+
+    def delete = {
+        def sectionExtendedAttributeInstance = SectionExtendedAttribute.get( params.id )
+        if(sectionExtendedAttributeInstance) {
+            try {
+                sectionExtendedAttributeInstance.delete(flush:true)
+                flash.message = "SectionExtendedAttribute ${params.id} deleted"
+                redirect(action:list)
+            }
+            catch(org.springframework.dao.DataIntegrityViolationException e) {
+                flash.message = "SectionExtendedAttribute ${params.id} could not be deleted"
+                redirect(action:show,id:params.id)
+            }
+        }
+        else {
+            flash.message = "SectionExtendedAttribute not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def edit = {
+        def sectionExtendedAttributeInstance = SectionExtendedAttribute.get( params.id )
+
+        if(!sectionExtendedAttributeInstance) {
+            flash.message = "SectionExtendedAttribute not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else {
+            return [ sectionExtendedAttributeInstance : sectionExtendedAttributeInstance ]
+        }
+    }
+
+    def update = {
+        def sectionExtendedAttributeInstance = SectionExtendedAttribute.get( params.id )
+        if(sectionExtendedAttributeInstance) {
+            if(params.version) {
+                def version = params.version.toLong()
+                if(sectionExtendedAttributeInstance.version > version) {
+                    
+                    sectionExtendedAttributeInstance.errors.rejectValue("version", "sectionExtendedAttribute.optimistic.locking.failure", "Another user has updated this SectionExtendedAttribute while you were editing.")
+                    render(view:'edit',model:[sectionExtendedAttributeInstance:sectionExtendedAttributeInstance])
+                    return
+                }
+            }
+            sectionExtendedAttributeInstance.properties = params
+            if(!sectionExtendedAttributeInstance.hasErrors() && sectionExtendedAttributeInstance.save(flush: true)) {
+                flash.message = "SectionExtendedAttribute ${params.id} updated"
+                redirect(action:show,id:sectionExtendedAttributeInstance.id)
+            }
+            else {
+                render(view:'edit',model:[sectionExtendedAttributeInstance:sectionExtendedAttributeInstance])
+            }
+        }
+        else {
+            flash.message = "SectionExtendedAttribute not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def create = {
+        def sectionExtendedAttributeInstance = new SectionExtendedAttribute()
+        sectionExtendedAttributeInstance.properties = params
+        return ['sectionExtendedAttributeInstance':sectionExtendedAttributeInstance]
+    }
+
+    def save = {
+        def sectionExtendedAttributeInstance = new SectionExtendedAttribute(params)
+        if(!sectionExtendedAttributeInstance.hasErrors() && sectionExtendedAttributeInstance.save(flush: true)) {
+            flash.message = "SectionExtendedAttribute ${sectionExtendedAttributeInstance.id} created"
+            redirect(action:show,id:sectionExtendedAttributeInstance.id)
+        }
+        else {
+            render(view:'create',model:[sectionExtendedAttributeInstance:sectionExtendedAttributeInstance])
+        }
+    }
+}
Index: trunk/grails-app/controllers/SiteController.groovy
===================================================================
--- trunk/grails-app/controllers/SiteController.groovy	(revision 286)
+++ 	(revision )
@@ -1,99 +1,0 @@
-import org.codehaus.groovy.grails.plugins.springsecurity.Secured
-
-class SiteController extends BaseAppAdminController {
-    
-    def index = { redirect(action:list,params:params) }
-
-    // the delete, save and update actions only accept POST requests
-    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
-
-    def list = {
-        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
-        [ siteInstanceList: Site.list( params ), siteInstanceTotal: Site.count() ]
-    }
-
-    def show = {
-        def siteInstance = Site.get( params.id )
-
-        if(!siteInstance) {
-            flash.message = "Site not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else { return [ siteInstance : siteInstance ] }
-    }
-
-    def delete = {
-        def siteInstance = Site.get( params.id )
-        if(siteInstance) {
-            try {
-                siteInstance.delete(flush:true)
-                flash.message = "Site ${params.id} deleted"
-                redirect(action:list)
-            }
-            catch(org.springframework.dao.DataIntegrityViolationException e) {
-                flash.message = "Site ${params.id} could not be deleted"
-                redirect(action:show,id:params.id)
-            }
-        }
-        else {
-            flash.message = "Site not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def edit = {
-        def siteInstance = Site.get( params.id )
-
-        if(!siteInstance) {
-            flash.message = "Site not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else {
-            return [ siteInstance : siteInstance ]
-        }
-    }
-
-    def update = {
-        def siteInstance = Site.get( params.id )
-        if(siteInstance) {
-            if(params.version) {
-                def version = params.version.toLong()
-                if(siteInstance.version > version) {
-                    
-                    siteInstance.errors.rejectValue("version", "site.optimistic.locking.failure", "Another user has updated this Site while you were editing.")
-                    render(view:'edit',model:[siteInstance:siteInstance])
-                    return
-                }
-            }
-            siteInstance.properties = params
-            if(!siteInstance.hasErrors() && siteInstance.save(flush: true)) {
-                flash.message = "Site ${params.id} updated"
-                redirect(action:show,id:siteInstance.id)
-            }
-            else {
-                render(view:'edit',model:[siteInstance:siteInstance])
-            }
-        }
-        else {
-            flash.message = "Site not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def create = {
-        def siteInstance = new Site()
-        siteInstance.properties = params
-        return ['siteInstance':siteInstance]
-    }
-
-    def save = {
-        def siteInstance = new Site(params)
-        if(!siteInstance.hasErrors() && siteInstance.save(flush: true)) {
-            flash.message = "Site ${siteInstance.id} created"
-            redirect(action:show,id:siteInstance.id)
-        }
-        else {
-            render(view:'create',model:[siteInstance:siteInstance])
-        }
-    }
-}
Index: trunk/grails-app/controllers/SiteDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/SiteDetailedController.groovy	(revision 288)
+++ trunk/grails-app/controllers/SiteDetailedController.groovy	(revision 288)
@@ -0,0 +1,100 @@
+import org.codehaus.groovy.grails.plugins.springsecurity.Secured
+
+@Secured(['ROLE_Manager','ROLE_AppAdmin'])
+class SiteDetailedController extends BaseController {
+    
+    def index = { redirect(action:list,params:params) }
+
+    // the delete, save and update actions only accept POST requests
+    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
+
+    def list = {
+        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
+        [ siteInstanceList: Site.list( params ), siteInstanceTotal: Site.count() ]
+    }
+
+    def show = {
+        def siteInstance = Site.get( params.id )
+
+        if(!siteInstance) {
+            flash.message = "Site not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else { return [ siteInstance : siteInstance ] }
+    }
+
+    def delete = {
+        def siteInstance = Site.get( params.id )
+        if(siteInstance) {
+            try {
+                siteInstance.delete(flush:true)
+                flash.message = "Site ${params.id} deleted"
+                redirect(action:list)
+            }
+            catch(org.springframework.dao.DataIntegrityViolationException e) {
+                flash.message = "Site ${params.id} could not be deleted"
+                redirect(action:show,id:params.id)
+            }
+        }
+        else {
+            flash.message = "Site not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def edit = {
+        def siteInstance = Site.get( params.id )
+
+        if(!siteInstance) {
+            flash.message = "Site not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else {
+            return [ siteInstance : siteInstance ]
+        }
+    }
+
+    def update = {
+        def siteInstance = Site.get( params.id )
+        if(siteInstance) {
+            if(params.version) {
+                def version = params.version.toLong()
+                if(siteInstance.version > version) {
+                    
+                    siteInstance.errors.rejectValue("version", "site.optimistic.locking.failure", "Another user has updated this Site while you were editing.")
+                    render(view:'edit',model:[siteInstance:siteInstance])
+                    return
+                }
+            }
+            siteInstance.properties = params
+            if(!siteInstance.hasErrors() && siteInstance.save(flush: true)) {
+                flash.message = "Site ${params.id} updated"
+                redirect(action:show,id:siteInstance.id)
+            }
+            else {
+                render(view:'edit',model:[siteInstance:siteInstance])
+            }
+        }
+        else {
+            flash.message = "Site not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def create = {
+        def siteInstance = new Site()
+        siteInstance.properties = params
+        return ['siteInstance':siteInstance]
+    }
+
+    def save = {
+        def siteInstance = new Site(params)
+        if(!siteInstance.hasErrors() && siteInstance.save(flush: true)) {
+            flash.message = "Site ${siteInstance.id} created"
+            redirect(action:show,id:siteInstance.id)
+        }
+        else {
+            render(view:'create',model:[siteInstance:siteInstance])
+        }
+    }
+}
Index: trunk/grails-app/controllers/SiteExtendedAttributeController.groovy
===================================================================
--- trunk/grails-app/controllers/SiteExtendedAttributeController.groovy	(revision 286)
+++ 	(revision )
@@ -1,99 +1,0 @@
-import org.codehaus.groovy.grails.plugins.springsecurity.Secured
-
-class SiteExtendedAttributeController extends BaseAppAdminController {
-    
-    def index = { redirect(action:list,params:params) }
-
-    // the delete, save and update actions only accept POST requests
-    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
-
-    def list = {
-        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
-        [ siteExtendedAttributeInstanceList: SiteExtendedAttribute.list( params ), siteExtendedAttributeInstanceTotal: SiteExtendedAttribute.count() ]
-    }
-
-    def show = {
-        def siteExtendedAttributeInstance = SiteExtendedAttribute.get( params.id )
-
-        if(!siteExtendedAttributeInstance) {
-            flash.message = "SiteExtendedAttribute not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else { return [ siteExtendedAttributeInstance : siteExtendedAttributeInstance ] }
-    }
-
-    def delete = {
-        def siteExtendedAttributeInstance = SiteExtendedAttribute.get( params.id )
-        if(siteExtendedAttributeInstance) {
-            try {
-                siteExtendedAttributeInstance.delete(flush:true)
-                flash.message = "SiteExtendedAttribute ${params.id} deleted"
-                redirect(action:list)
-            }
-            catch(org.springframework.dao.DataIntegrityViolationException e) {
-                flash.message = "SiteExtendedAttribute ${params.id} could not be deleted"
-                redirect(action:show,id:params.id)
-            }
-        }
-        else {
-            flash.message = "SiteExtendedAttribute not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def edit = {
-        def siteExtendedAttributeInstance = SiteExtendedAttribute.get( params.id )
-
-        if(!siteExtendedAttributeInstance) {
-            flash.message = "SiteExtendedAttribute not found with id ${params.id}"
-            redirect(action:list)
-        }
-        else {
-            return [ siteExtendedAttributeInstance : siteExtendedAttributeInstance ]
-        }
-    }
-
-    def update = {
-        def siteExtendedAttributeInstance = SiteExtendedAttribute.get( params.id )
-        if(siteExtendedAttributeInstance) {
-            if(params.version) {
-                def version = params.version.toLong()
-                if(siteExtendedAttributeInstance.version > version) {
-                    
-                    siteExtendedAttributeInstance.errors.rejectValue("version", "siteExtendedAttribute.optimistic.locking.failure", "Another user has updated this SiteExtendedAttribute while you were editing.")
-                    render(view:'edit',model:[siteExtendedAttributeInstance:siteExtendedAttributeInstance])
-                    return
-                }
-            }
-            siteExtendedAttributeInstance.properties = params
-            if(!siteExtendedAttributeInstance.hasErrors() && siteExtendedAttributeInstance.save(flush: true)) {
-                flash.message = "SiteExtendedAttribute ${params.id} updated"
-                redirect(action:show,id:siteExtendedAttributeInstance.id)
-            }
-            else {
-                render(view:'edit',model:[siteExtendedAttributeInstance:siteExtendedAttributeInstance])
-            }
-        }
-        else {
-            flash.message = "SiteExtendedAttribute not found with id ${params.id}"
-            redirect(action:list)
-        }
-    }
-
-    def create = {
-        def siteExtendedAttributeInstance = new SiteExtendedAttribute()
-        siteExtendedAttributeInstance.properties = params
-        return ['siteExtendedAttributeInstance':siteExtendedAttributeInstance]
-    }
-
-    def save = {
-        def siteExtendedAttributeInstance = new SiteExtendedAttribute(params)
-        if(!siteExtendedAttributeInstance.hasErrors() && siteExtendedAttributeInstance.save(flush: true)) {
-            flash.message = "SiteExtendedAttribute ${siteExtendedAttributeInstance.id} created"
-            redirect(action:show,id:siteExtendedAttributeInstance.id)
-        }
-        else {
-            render(view:'create',model:[siteExtendedAttributeInstance:siteExtendedAttributeInstance])
-        }
-    }
-}
Index: trunk/grails-app/controllers/SiteExtendedAttributeDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/SiteExtendedAttributeDetailedController.groovy	(revision 288)
+++ trunk/grails-app/controllers/SiteExtendedAttributeDetailedController.groovy	(revision 288)
@@ -0,0 +1,100 @@
+import org.codehaus.groovy.grails.plugins.springsecurity.Secured
+
+@Secured(['ROLE_Manager','ROLE_AppAdmin'])
+class SiteExtendedAttributeDetailedController extends BaseController {
+    
+    def index = { redirect(action:list,params:params) }
+
+    // the delete, save and update actions only accept POST requests
+    static allowedMethods = [delete:'POST', save:'POST', update:'POST']
+
+    def list = {
+        params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
+        [ siteExtendedAttributeInstanceList: SiteExtendedAttribute.list( params ), siteExtendedAttributeInstanceTotal: SiteExtendedAttribute.count() ]
+    }
+
+    def show = {
+        def siteExtendedAttributeInstance = SiteExtendedAttribute.get( params.id )
+
+        if(!siteExtendedAttributeInstance) {
+            flash.message = "SiteExtendedAttribute not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else { return [ siteExtendedAttributeInstance : siteExtendedAttributeInstance ] }
+    }
+
+    def delete = {
+        def siteExtendedAttributeInstance = SiteExtendedAttribute.get( params.id )
+        if(siteExtendedAttributeInstance) {
+            try {
+                siteExtendedAttributeInstance.delete(flush:true)
+                flash.message = "SiteExtendedAttribute ${params.id} deleted"
+                redirect(action:list)
+            }
+            catch(org.springframework.dao.DataIntegrityViolationException e) {
+                flash.message = "SiteExtendedAttribute ${params.id} could not be deleted"
+                redirect(action:show,id:params.id)
+            }
+        }
+        else {
+            flash.message = "SiteExtendedAttribute not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def edit = {
+        def siteExtendedAttributeInstance = SiteExtendedAttribute.get( params.id )
+
+        if(!siteExtendedAttributeInstance) {
+            flash.message = "SiteExtendedAttribute not found with id ${params.id}"
+            redirect(action:list)
+        }
+        else {
+            return [ siteExtendedAttributeInstance : siteExtendedAttributeInstance ]
+        }
+    }
+
+    def update = {
+        def siteExtendedAttributeInstance = SiteExtendedAttribute.get( params.id )
+        if(siteExtendedAttributeInstance) {
+            if(params.version) {
+                def version = params.version.toLong()
+                if(siteExtendedAttributeInstance.version > version) {
+                    
+                    siteExtendedAttributeInstance.errors.rejectValue("version", "siteExtendedAttribute.optimistic.locking.failure", "Another user has updated this SiteExtendedAttribute while you were editing.")
+                    render(view:'edit',model:[siteExtendedAttributeInstance:siteExtendedAttributeInstance])
+                    return
+                }
+            }
+            siteExtendedAttributeInstance.properties = params
+            if(!siteExtendedAttributeInstance.hasErrors() && siteExtendedAttributeInstance.save(flush: true)) {
+                flash.message = "SiteExtendedAttribute ${params.id} updated"
+                redirect(action:show,id:siteExtendedAttributeInstance.id)
+            }
+            else {
+                render(view:'edit',model:[siteExtendedAttributeInstance:siteExtendedAttributeInstance])
+            }
+        }
+        else {
+            flash.message = "SiteExtendedAttribute not found with id ${params.id}"
+            redirect(action:list)
+        }
+    }
+
+    def create = {
+        def siteExtendedAttributeInstance = new SiteExtendedAttribute()
+        siteExtendedAttributeInstance.properties = params
+        return ['siteExtendedAttributeInstance':siteExtendedAttributeInstance]
+    }
+
+    def save = {
+        def siteExtendedAttributeInstance = new SiteExtendedAttribute(params)
+        if(!siteExtendedAttributeInstance.hasErrors() && siteExtendedAttributeInstance.save(flush: true)) {
+            flash.message = "SiteExtendedAttribute ${siteExtendedAttributeInstance.id} created"
+            redirect(action:show,id:siteExtendedAttributeInstance.id)
+        }
+        else {
+            render(view:'create',model:[siteExtendedAttributeInstance:siteExtendedAttributeInstance])
+        }
+    }
+}
