             reject err  if err
             resolve()
 
+deleteAccount = (partial) ->
+
+  fetchMyRelativeGroups (err, groups) ->
+
+    return  if showError err
+
+    groups = groups.filter (group) -> 'owner' in group.roles
+
+    new DeleteAccountModal {}, groups
 
 
 fetchApiTokens = ->

globals = require 'globals'
showError = require 'app/util/showError'
DeleteTeamOverlay = require 'app/components/deleteteamoverlay'
verifyPassword = require 'app/util/verifyPassword'

loadTeam = ->

  loadTeam
  leaveTeam
  deleteTeam
  deleteAccount
  updateTeam
  updateInvitationInputValue
  fetchMembers
