title: Grails get session variable from domain validator
body: <p>Im sure this is a common scenario, but I haven't found any answers. I have a session-scoped variable that holds the currently signed in user and I need to perform conditional validation by way of a custom validator in a domain object. Is there a way to get the the current user from the session scope while in a validator, or is there perhaps another way to do this, keeping in mind that I want to be able to return the errors for specific fields from my validator(e.g. <code>if(isBlank(it))return ['blank','summary',Presentation];</code>)  </p>
  
  <p>basic struture:</p>
  
  <pre><code>class MyDomain 
  {
      String aProperty;
      static constraints =
      {
          aProperty(validator:{
          if(isAdmin())return true;
          if(isBlank(it))return ['blank','summary',Presentation];
          })
      }
  }
  </code></pre>