Ignore:
Timestamp:
Mar 25, 2009, 4:26:43 AM (16 years ago)
Author:
gav
Message:

More detailing on Task and Entry. Added another authorisation ROLE_Manager and view to go with it. Work on PersonController? delete action.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/grails-app/conf/BootStrap.groovy

    r84 r91  
    6767        BootStrapSaveAndTest(authInstance)
    6868
    69         authInstance = new Authority(description:"Application User, all application users need this base role.",
     69        authInstance = new Authority(description:"Business manager, grants full management access.",
     70                                        authority:"ROLE_Manager")
     71        BootStrapSaveAndTest(authInstance)
     72
     73        authInstance = new Authority(description:"Application User, all application users need this base role to allow login.",
    7074                                        authority:"ROLE_AppUser")
    7175        BootStrapSaveAndTest(authInstance)
     
    8589        personInstance.addToAuthorities(Authority.get(1))
    8690        personInstance.addToAuthorities(Authority.get(2))
     91        personInstance.addToAuthorities(Authority.get(3))
    8792        personInstance.addToPersonGroups(PersonGroup.findByName("gnuMims"))
    8893
    89         personInstance = new Person(loginName:"admin2",
    90                                     firstName:"Admin2",
    91                                     lastName:"Powers2",
    92                                     pass:passClearText,
    93                                     password:passwordEncoded,
    94                                     email:"admin2@example.com")
    95         BootStrapSaveAndTest(personInstance)
    96         personInstance.addToAuthorities(Authority.get(1))
     94        personInstance = new Person(loginName:"manager",
     95                                    firstName:"Meca",
     96                                    lastName:"Manager",
     97                                    pass:passClearText,
     98                                    password:passwordEncoded,
     99                                    email:"manager@example.com")
     100        BootStrapSaveAndTest(personInstance)
    97101        personInstance.addToAuthorities(Authority.get(2))
     102        personInstance.addToAuthorities(Authority.get(3))
    98103        personInstance.addToPersonGroups(PersonGroup.findByName("gnuMims"))
    99104
     
    105110                                    email:"user@example.com")
    106111        BootStrapSaveAndTest(personInstance)
    107         personInstance.addToAuthorities(Authority.get(2))
     112        personInstance.addToAuthorities(Authority.get(3))
    108113        personInstance.addToPersonGroups(PersonGroup.findByName("Electrical"))
    109114
     
    115120                                    email:"user@example.com")
    116121        BootStrapSaveAndTest(personInstance)
    117         personInstance.addToAuthorities(Authority.get(2))
     122        personInstance.addToAuthorities(Authority.get(3))
    118123        personInstance.addToPersonGroups(PersonGroup.findByName("Electrical"))
    119124
     
    125130                                    email:"user@example.com")
    126131        BootStrapSaveAndTest(personInstance)
    127         personInstance.addToAuthorities(Authority.get(2))
     132        personInstance.addToAuthorities(Authority.get(3))
    128133        personInstance.addToPersonGroups(PersonGroup.findByName("Mechanical"))
    129134
     
    135140                                    email:"user@example.com")
    136141        BootStrapSaveAndTest(personInstance)
    137         personInstance.addToAuthorities(Authority.get(2))
     142        personInstance.addToAuthorities(Authority.get(3))
    138143        personInstance.addToPersonGroups(PersonGroup.findByName("Production"))
    139144
Note: See TracChangeset for help on using the changeset viewer.