         policy.emit 'MembershipPolicyChangeSaved'
         new KDNotificationView {title:"Membership policy has been updated."}
       showError err
-

globals = require 'globals'
getGroup = require '../util/getGroup'
remote = require('../remote').getInstance()
trackEvent = require '../util/trackEvent'
whoami = require '../util/whoami'
showError = require '../util/showError'
kd = require 'kd'
KDController = kd.Controller
KDNotificationView = kd.NotificationView
GroupData = require './groupdata'


module.exports = class GroupsController extends KDController

  getCurrentGroup:->
    throw 'FIXME: array should never be passed'  if Array.isArray @currentGroupData.data
    return @currentGroupData.data

  currentGroupHasStack: ->
    {stackTemplates} = @getCurrentGroup()
    return stackTemplates?.length > 0


  filterXssAndForwardEvents: (target, events) ->
    events.forEach (event) =>
