             callback  : -> callback { status : yes, modal }
 
       modal.setAttribute 'testpath', 'RemoveStackModal'
+
+
+  shareCredentials: (callback) ->
+
+    [ credential ] = @credentialStatusView.credentialsData
+    { slug } = kd.singletons.groupsController.getCurrentGroup()
+    credential.shareWith { target: slug }, (err) =>
+      console.warn 'Failed to share credential:', err  if err
+      callback()


    @providersView.on 'ItemSelected', (credentialItem) =>

      # After adding credential, we are sharing it with the current
      # group, so anyone in this group can use this credential ~ GG
      { slug } = kd.singletons.groupsController.getCurrentGroup()

      credential = credentialItem.getData()

      credential.shareWith { target: slug }, (err) =>
        console.warn 'Failed to share credential:', err  if err
        @credentialStatusView.setCredential credential

        @providersView.resetItems()
        credentialItem.inuseView.show()

    @providersView.on 'ItemDeleted', (credential) =>


      cssClass       : 'GenericButton hidden set-default'
      callback       : =>
        appManager.tell 'Stacks', 'exitFullscreen'  unless @getOption 'skipFullscreen'
        createShareModal (needShare, modal) =>
          @once 'Completed', =>
            if needShare
              @shareCredentials -> modal.destroy()
            else
              modal.destroy()
          @handleSetDefaultTemplate()

    @buttons.addSubView @generateStackButton = new kd.ButtonView
      title          : 'INITIALIZE'
