   destroy$: permit
 
     advanced: [
+      { permission: 'delete stack' }
       { permission: 'delete own stack', validateWith: Validators.own }
     ]
 

            @unuseStackTemplate callback


  delete: (callback) ->

    if @baseStackId
      return callback new KodingError \
        'Stacks generated from templates can only be destroyed by Kloud.'


      @destroy => @remove callback


  forceDelete: permit

    advanced: [
      { permission: 'delete stack' }
      { permission: 'delete stack', superadmin: yes }
    ]

    success: (client, callback) ->

      @unuseStackTemplate (err) =>
        return callback err  if err
        @delete callback, force = yes


  delete$: permit

    # TODO Add password check for stack delete
