Ignore:
Timestamp:
Mar 9, 2009, 10:31:40 AM (15 years ago)
Author:
gav
Message:

Add TaskPriority? and TaskType? domains, generate views and controllers.
Tweak security extensively.
Use 'extend BaseController?' to pass ROLE_USER to most controllers.
Add parentTask and subTask to Task Domain.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/TaskRewrite/src/grails-app/conf/SecurityConfig.groovy

    r58 r69  
    1313
    1414    //Required if we want to run "grails generate-manager"
    15     //Which recreates the controller and views, so save the views.
     15    //Which recreates the controller and views, so save the views!
    1616//     requestMapClass = 'Requestmap'
    1717
    1818    useRequestMapDomainClass = false
    1919    useControllerAnnotations = true
     20
     21    //Set true especially if used across the internet.
     22    forceHttps = 'true'
     23
     24    //Pessimistic locking, deny access to all URLs that don't
     25    //have an applicable URL-Role configuration.
     26    //This forces us to set an annotation, static rule or
     27    //extend BaseController and prevents accidentally leaving pages open.
     28    controllerAnnotationsRejectIfNoRule = true
     29   
     30    //Static rules for controllers, actions and urls.
     31    //Since we are using pessimistic locking we have to set some things
     32    //here but most security should be set in the controllers.
     33    controllerAnnotationStaticRules = [
     34    '/': ['IS_AUTHENTICATED_FULLY'],
     35    '/index.gsp': ['IS_AUTHENTICATED_FULLY'],
     36    '/css/*': ['IS_AUTHENTICATED_ANONYMOUSLY'],
     37    '/images/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
     38    '/login*': ['IS_AUTHENTICATED_ANONYMOUSLY'],
     39    '/login/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
     40    '/logout*': ['IS_AUTHENTICATED_FULLY'],
     41    '/logout/**': ['IS_AUTHENTICATED_FULLY']
     42    ]
     43
     44    //We always want to go to the home page so that bookmarks are not used.
     45    defaultTargetUrl = '/appCore/home'
     46    alwaysUseDefaultTargetUrl = true
     47
    2048}
Note: See TracChangeset for help on using the changeset viewer.