         return callback \
           new KodingError "It is not allowed to change owner state!"
 
+      # If it's a call for unshare then no need to check
+      # any other state for it
+      if asUser is no
+        JMachine::shareWith.call this, options, callback
+
+        return
+
       # Permanent option is only valid for paid accounts
       # if its passed then we need to check payment
       #

    if isOwner user, this
      return callback null

    options = target: [user.username], asUser: no

    @shareWith options, (err)->
      callback err

    return owner


  excludeUser = (options)->

    { users, user, permanent } = options

    userId   = user.getId()
    newUsers = []

    for u in users
      if u.permanent isnt permanent or not userId.equals u.id
        newUsers.push u

    return newUsers

