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

Svn move PersonService to AuthService?.

Location:
trunk/grails-app/controllers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • 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]
Note: See TracChangeset for help on using the changeset viewer.