 
   , (client, callback) ->
 
-    { r: { user } } = client
+    { r: { user, group } } = client
 
     # An owner cannot approve their own machine
     if isOwner user, this

      'users.id' : user._id
    }, { $set : { 'users.$.approved' : yes } }
    , (err) =>
      options = { action: 'approve', @uid, group: client?.context?.group, machineId: @getId() }
      client.connection.delegate.sendNotification 'MachineShareActionTaken', options
      callback err


      permanent : yes

    @shareWith options, (err) =>
      options               = { action: 'deny', @uid, group: group.slug, machineId: @getId() }
      [ owner ]             = @users.filter (user) -> return user.owner
      { notifyByUsernames } = require '../notify'

