       if isPrivateGroup
         modalOptions.tabs.forms['Membership policy'] =
           title   : "Membership policy"
+        modalOptions.tabs.forms['Invitations'] =
+          title   : "Invitations"
 
     modal = new KDModalViewWithForms modalOptions, group
     

              membershipPolicyView.emit 'MembershipPolicyChangeSaved'

          forms["Membership policy"].addSubView membershipPolicyView
    
      forms["Members"].addSubView new GroupsMemberPermissionsView {}, group



    if err.accessCode is ERROR_POLICY
      defaultOptions.buttons['Request access'] = 
        cssClass    : 'modal-clean-green'
        loader      :
          color     : "#ffffff"
          diameter  : 12
        callback    : -> @getDelegate().emit 'AccessIsRequested'

    _.extend defaultOptions, customOptions

  showErrorModal:(group, err)->
    modal = new KDModalView getErrorModalOptions err
    modal.on 'AccessIsRequested', =>
      @requestAccess group, (err)-> modal.destroy()

  requestAccess:(group, callback)->
    group.requestInvitation (err)->
      callback err
      new KDNotificationView title:
        if err then err.message
        else "Invitation has been requested!"


  openPrivateGroup:(group)->
    group.canOpenGroup (err, policy)=>
