Changeset 198


Ignore:
Timestamp:
Nov 27, 2009, 1:54:05 PM (14 years ago)
Author:
gav
Message:

Some commenting to PersonService.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/PersonService.groovy

    r182 r198  
    1 /* Provides a service class with some methods that integrate the Person domain class and Acegi security.
     1/**
     2 * Provides a service class with some methods that integrate the Person domain class and Acegi security.
    23 *
    34 */
     
    89    def authenticateService
    910
    10     // Get current user as a Person and in a safe way to avoid a null userDomain during bootstrap.
     11    /**
     12    * Get the current user in a safe way to avoid a null userDomain.
     13    * @returns The current user or the 'system' person (Person #1) if userDomain() is not active.
     14    */
    1115    def currentUser() {
    1216        if(authenticateService.userDomain()) {
     
    1418        }
    1519        else {
    16             //println "Warning: userDomain not active yet, attempting to return Person #1"
     20            log.warn "userDomain not active, attempting to return Person #1."
    1721            return Person.get(1)
    1822        }
    1923    }
    2024
    21     // Convenience wrapper.
     25    /**
     26    * Convenience wrapper around authenticateService.encodePassword().
     27    * @param passClearText The clear text password to encode.
     28    * @returns The encoded password.
     29    */
    2230    def encodePassword(passClearText) {
    2331        authenticateService.encodePassword(passClearText)
Note: See TracChangeset for help on using the changeset viewer.