     indexes         :
       code          : 'unique'
     sharedMethods   :
-      static        : ['create','byCode','sendBetaInviteFromClient'] # ,'__createBetaInvites'
+      static        : ['create','byCode','sendBetaInviteFromClient','grantInvitesFromClient']
     schema          :
       code          : String
       inviteeEmail  : String

          else
            log "[JInvitation.sendBetaInvite] something got messed up."

  
  # @__createBetaInvites =do ->
  #   #betaTestersEmails = 'chris123412341234@jraphical.com'
  #   betaTestersEmails = fs.readFileSync('./invitee-emails2.txt', 'utf-8')
  #   #betaTestersEmails = 'chris123123@jraphical.com'
  #   (callback)->
  #     JAccount.one {'profile.nickname': 'devrim'}, (err, devrim)=>
  #       i = 0
  #       recipients = []
  #       uniq(betaTestersEmails.split '\n').forEach (email)->
  #         code = crypto
  #           .createHmac('sha1', 'kodingsecret')
  #           .update(email)
  #           .digest('hex')
  #         # console.log email, code
  #         recipients.push ->
  #           invite = new JInvitation {
  #             code
  #             inviteeEmail  : email
  #             maxUses       : 1
  #             origin        : ObjectRef(devrim)
  #             type          : 'launchrock'
  #           }
  #           invite.save (err)-> 
  #             recipients.next(err)
  #       recipients.push -> callback(recipients)
  #       daisy recipients
  
  @grant =(selector, quota, callback)->
    unless quota > 0

        targetType  : JAccount
        as          : 'redeemer'
  
  
  createBetaInvite = (options,callback)->
    {inviterUsername,inviteeEmail,inviteType} = options
