Changeset 291


Ignore:
Timestamp:
Jan 23, 2010, 10:42:41 AM (10 years ago)
Author:
gav
Message:

Svn move PersonService to AuthService?.

Location:
trunk/grails-app
Files:
10 edited
1 moved

Legend:

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

    r278 r291  
    8686    error "grails.app" // Set the default log level for our app code.
    8787    info "grails.app.bootstrap" // Set the log level per type and per type.class
    88     error "grails.app.service.PersonService"
     88    error "grails.app.service.AuthService"
    8989    error "grails.app.service.NavigationService"
    9090    error "grails.app.service.com.zeddware.grails.plugins.filterpane.FilterService"
  • trunk/grails-app/controllers/AppCoreController.groovy

    r258 r291  
    66class AppCoreController extends BaseController {
    77
    8     def personService
     8    def authService
    99    def appConfigService
    1010    def createDataService
     
    2222    */
    2323    def welcome = {
    24         def personInstance = personService.currentUser
     24        def personInstance = authService.currentUser
    2525        flash.message = "Welcome, ${personInstance.firstName} ${personInstance.lastName}."
    2626
     
    4141    def changeSessionTimeout = {
    4242        if (request.method == 'GET') {
    43             def personInstance = personService.currentUser
     43            def personInstance = authService.currentUser
    4444            return [ personInstance : personInstance ]       
    4545        }
    4646        if (request.method == 'POST') {
    47             def personInstance = personService.currentUser
     47            def personInstance = authService.currentUser
    4848                personInstance.properties = params
    4949                if (!personInstance.hasErrors() && personInstance.save(flush: true)) {
     
    6767
    6868        if (request.method == 'GET') {
    69             def personInstance = personService.currentUser
     69            def personInstance = authService.currentUser
    7070            return [ personInstance : personInstance ]       
    7171        }
    7272
    7373        if (request.method == 'POST') {
    74             def personInstance = personService.currentUser
     74            def personInstance = authService.currentUser
    7575
    7676            if(params.confirmPass == params.pass) {
  • trunk/grails-app/controllers/EntryDetailedController.groovy

    r216 r291  
    33class EntryDetailedController extends BaseController {
    44
    5     def personService
     5    def authService
    66    def taskService
    77
     
    2929        def entryInstance = Entry.get( params.id )
    3030        if(entryInstance) {
    31             if(entryInstance.enteredBy.loginName == personService.currentUser.loginName) {
     31            if(entryInstance.enteredBy.loginName == authService.currentUser.loginName) {
    3232                def taskID = entryInstance.task.id
    3333                entryInstance.delete(flush:true)
     
    5555        else {
    5656
    57             if(entryInstance.enteredBy.loginName == personService.currentUser.loginName) {
     57            if(entryInstance.enteredBy.loginName == authService.currentUser.loginName) {
    5858                return [ entryInstance : entryInstance ]
    5959            }
     
    7070        if(entryInstance) {
    7171            // The update method only accepts post requests, so this is just in case.
    72             if(entryInstance.enteredBy.loginName == personService.currentUser.loginName) {
     72            if(entryInstance.enteredBy.loginName == authService.currentUser.loginName) {
    7373                entryInstance.properties = params
    7474                if(!entryInstance.hasErrors() && entryInstance.save(flush: true)) {
  • trunk/grails-app/controllers/TaskDetailedController.groovy

    r262 r291  
    55class TaskDetailedController extends BaseController {
    66
    7     def personService
     7    def authService
    88    def taskService
    99    def taskSearchService
     
    4545        def taskInstanceTotal
    4646        def filterParams = [:]
    47         def personInstance = personService.currentUser
     47        def personInstance = authService.currentUser
    4848
    4949        // Quick Search:
     
    125125        if(!FilterUtils.isFilterApplied(params)) {
    126126            def taskInstanceList = []
    127             def personInstance = personService.currentUser
     127            def personInstance = authService.currentUser
    128128
    129129            if(params.quickSearch == "searchMyTodays") {
     
    170170        if(!FilterUtils.isFilterApplied(params)) {
    171171            def taskInstanceList = []
    172             def personInstance = personService.currentUser
     172            def personInstance = authService.currentUser
    173173
    174174            if(params.quickSearch == "budgetUnplanned") {
     
    501501
    502502        // Default leadPerson to current user, unless supplied in params.
    503         taskInstance.leadPerson = personService.currentUser
     503        taskInstance.leadPerson = authService.currentUser
    504504        taskInstance.properties = params
    505505        return ['taskInstance': taskInstance]
  • trunk/grails-app/services/AssignedGroupService.groovy

    r256 r291  
    33    boolean transactional = false
    44
    5     def personService
     5    def authService
    66
    77    def delete(params) {
     
    2222                return fail(code:"default.not.found")
    2323
    24             def taskModification = new TaskModification(person: personService.currentUser,
     24            def taskModification = new TaskModification(person: authService.currentUser,
    2525                                                    taskModificationType: TaskModificationType.get(10),
    2626                                                    task: result.assignedGroupInstance.task)
     
    9595                return fail(code:"default.update.failure")
    9696
    97             def taskModification = new TaskModification(person: personService.currentUser,
     97            def taskModification = new TaskModification(person: authService.currentUser,
    9898                                                    taskModificationType: TaskModificationType.get(10),
    9999                                                    task: result.assignedGroupInstance.task)
     
    155155
    156156            // Record a taskModification for everyone except "system".
    157             if(personService.currentUser.id != 1) {
    158                 def taskModification = new TaskModification(person: personService.currentUser,
     157            if(authService.currentUser.id != 1) {
     158                def taskModification = new TaskModification(person: authService.currentUser,
    159159                                                        taskModificationType: TaskModificationType.get(10),
    160160                                                        task: result.assignedGroupInstance.task)
  • trunk/grails-app/services/AssignedPersonService.groovy

    r255 r291  
    33    boolean transactional = false
    44
    5     def personService
     5    def authService
    66
    77    def delete(params) {
     
    2222                return fail(code:"default.not.found")
    2323
    24             def taskModification = new TaskModification(person: personService.currentUser,
     24            def taskModification = new TaskModification(person: authService.currentUser,
    2525                                                    taskModificationType: TaskModificationType.get(11),
    2626                                                    task: result.assignedPersonInstance.task)
     
    9595                return fail(code:"default.update.failure")
    9696
    97             def taskModification = new TaskModification(person: personService.currentUser,
     97            def taskModification = new TaskModification(person: authService.currentUser,
    9898                                                    taskModificationType: TaskModificationType.get(11),
    9999                                                    task: result.assignedPersonInstance.task)
     
    155155
    156156            // Record a taskModification for every one except "system".
    157             if(personService.currentUser.id != 1) {
    158                 def taskModification = new TaskModification(person: personService.currentUser,
     157            if(authService.currentUser.id != 1) {
     158                def taskModification = new TaskModification(person: authService.currentUser,
    159159                                                        taskModificationType: TaskModificationType.get(11),
    160160                                                        task: result.assignedPersonInstance.task)
  • trunk/grails-app/services/AuthService.groovy

    r290 r291  
    33 *
    44 */
    5 class PersonService {
     5class AuthService {
    66
    77    boolean transactional = false
  • trunk/grails-app/services/CreateBulkDataService.groovy

    r269 r291  
    88    boolean transactional = false
    99
    10     def personService
     10    def authService
    1111    def taskService
    1212    def dateUtilService
     
    8383        //Person
    8484        def passClearText = "pass"
    85         def passwordEncoded = personService.encodePassword(passClearText)
     85        def passwordEncoded = authService.encodePassword(passClearText)
    8686        def personInstance
    8787
  • trunk/grails-app/services/CreateDataService.groovy

    r290 r291  
    99    boolean transactional = false
    1010
    11     def personService
     11    def authService
    1212    def taskService
    1313    def dateUtilService
     
    194194        //Person
    195195        def passClearText = "pass"
    196         def passwordEncoded = personService.encodePassword(passClearText)
     196        def passwordEncoded = authService.encodePassword(passClearText)
    197197        def personInstance
    198198
     
    212212        //Person
    213213        def passClearText = "pass"
    214         def passwordEncoded = personService.encodePassword(passClearText)
     214        def passwordEncoded = authService.encodePassword(passClearText)
    215215        def personInstance
    216216
     
    234234        //Person
    235235        def passClearText = "pass"
    236         def passwordEncoded = personService.encodePassword(passClearText)
     236        def passwordEncoded = authService.encodePassword(passClearText)
    237237        def personInstance
    238238
  • trunk/grails-app/services/InventoryMovementService.groovy

    r226 r291  
    33    boolean transactional = false
    44
    5     def personService
     5    def authService
    66
    77    def reverseMove(params) {
     
    8888            result.inventoryMovementInstance = new InventoryMovement(params)
    8989
    90             result.inventoryMovementInstance.person = personService.currentUser
     90            result.inventoryMovementInstance.person = authService.currentUser
    9191
    9292            // Used type must have a task that is not complete or in the trash
  • trunk/grails-app/services/TaskService.groovy

    r252 r291  
    77    boolean transactional = false
    88
    9     def personService
     9    def authService
    1010    def assignedGroupService
    1111    def assignedPersonService
     
    5656
    5757            if(taskInstance.save()) {
    58                 def taskModification = new TaskModification(person: personService.currentUser,
     58                def taskModification = new TaskModification(person: authService.currentUser,
    5959                                                        taskModificationType: TaskModificationType.get(1),
    6060                                                        task: taskInstance)
     
    183183            def result = [:]
    184184            result.entryInstance = new Entry(params)
    185             result.entryInstance.enteredBy = personService.currentUser
     185            result.entryInstance.enteredBy = authService.currentUser
    186186
    187187            if(result.entryInstance.validate()) {
     
    207207
    208208                    // Create the "Started" task modification, this provides the "Actual started date".
    209                     def taskModification = new TaskModification(person: personService.currentUser,
     209                    def taskModification = new TaskModification(person: authService.currentUser,
    210210                                                            taskModificationType: TaskModificationType.get(2),
    211211                                                            task: taskInstance)
     
    279279                return fail()
    280280
    281             def taskModification = new TaskModification(person:personService.currentUser,
     281            def taskModification = new TaskModification(person:authService.currentUser,
    282282                                                    taskModificationType: TaskModificationType.get(3),
    283283                                                    task: result.taskInstance)
     
    318318
    319319                if(result.taskInstance.save()) {
    320                     def taskModification = new TaskModification(person:personService.currentUser,
     320                    def taskModification = new TaskModification(person:authService.currentUser,
    321321                                                            taskModificationType: TaskModificationType.get(4),
    322322                                                            task: result.taskInstance)
     
    367367
    368368                if(result.taskInstance.save()) {
    369                     def taskModification = new TaskModification(person:personService.currentUser,
     369                    def taskModification = new TaskModification(person:authService.currentUser,
    370370                                                            taskModificationType: TaskModificationType.get(5),
    371371                                                            task: result.taskInstance)
     
    416416
    417417                if(result.taskInstance.save()) {
    418                     def taskModification = new TaskModification(person:personService.currentUser,
     418                    def taskModification = new TaskModification(person:authService.currentUser,
    419419                                                            taskModificationType: TaskModificationType.get(6),
    420420                                                            task: result.taskInstance)
     
    464464
    465465                if(result.taskInstance.save()) {
    466                     def taskModification = new TaskModification(person:personService.currentUser,
     466                    def taskModification = new TaskModification(person:authService.currentUser,
    467467                                                            taskModificationType: TaskModificationType.get(7),
    468468                                                            task: result.taskInstance)
     
    512512
    513513                if(result.taskInstance.save()) {
    514                     def taskModification = new TaskModification(person:personService.currentUser,
     514                    def taskModification = new TaskModification(person:authService.currentUser,
    515515                                                            taskModificationType: TaskModificationType.get(8),
    516516                                                            task: result.taskInstance)
     
    560560
    561561                if(result.taskInstance.save()) {
    562                     def taskModification = new TaskModification(person:personService.currentUser,
     562                    def taskModification = new TaskModification(person:authService.currentUser,
    563563                                                            taskModificationType: TaskModificationType.get(9),
    564564                                                            task: result.taskInstance)
Note: See TracChangeset for help on using the changeset viewer.