           (signature String, Function)
         transferOwnership:
           (signature String, Function)
-        remove:
+        destroy:
           (signature Function)
         addSubscription:
           (signature String, Function)

{ Module }     = require 'jraphical'
{ difference } = require 'underscore'


      if err then callback err
      else oldAddOwner.call this, target, options, callback

  destroy    : permit
    advanced : [
      { permission: 'edit own groups', validateWith : Validators.own }
      { permission: 'edit groups',     superadmin   : yes }
    ]
    success  : (client, callback) ->

      removeHelper = (model, err, callback, next) ->
        return callback err  if err
        return next()  unless model

        model.remove (err) ->
          return callback err if err
          next()

      removeHelperMany = (klass, models, err, callback, next) ->
        return callback err  if err
        return next()  if not models or models.length < 1

        ids = (model._id for model in models)
        klass.remove ({ _id: { $in: ids } }), (err) ->
          return callback err  if err
          next()

      JName = require '../name'

      async.series [
        (next) =>
          JName.one { name: @slug }, (err, name) ->
            removeHelper name, err, callback, next

        (next) =>
          @fetchPermissionSet (err, permSet) ->
            removeHelper permSet, err, callback, next

        (next) =>
          @fetchDefaultPermissionSet (err, permSet) ->
            removeHelper permSet, err, callback, next

        (next) =>
          @fetchMembershipPolicy (err, policy) ->
            removeHelper policy, err, callback, next

        (next) =>
          @fetchInvitations (err, requests) ->
            JInvitation = require '../invitation'
            removeHelperMany JInvitation, requests, err, callback, next

        (next) =>
          @fetchTags (err, tags) ->
            JTag = require '../tag'
            removeHelperMany JTag, tags, err, callback, next

        (next) =>
          @constructor.emit 'GroupDestroyed', this
          next()

        (next) =>
          @remove (err) ->
            return callback err if err
            next()
      ],
        -> callback null


  sendNotificationToAdmins: (event, contents) ->
    @fetchAdmins (err, admins) =>
