<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
    i18n_domain="untranslated"
    >

  <include
      package="Products.CMFCore"
      file="permissions.zcml"
      />
  <include package="ploneintranet.layout" />

  <utility factory=".token_utility.TokenUtility" />

  <browser:page
      name="accept-token"
      for="Products.CMFCore.interfaces.ISiteRoot"
      class=".views.AcceptToken"
      permission="zope2.View"
      layer=".interfaces.IPloneintranetInvitationsLayer"
      />

  <browser:page
      name="ploneintranet-invitations-invite-user"
      for="Products.CMFCore.interfaces.ISiteRoot"
      class=".invitations.InviteUser"
      template="invite_user.pt"
      permission="cmf.ManagePortal"
      layer=".interfaces.IPloneintranetInvitationsLayer"
      />

  <subscriber
      for="ploneintranet.invitations.events.ITokenAccepted"
      handler=".invitations.accept_invitation"
      />

  <genericsetup:registerProfile
      name="default"
      title="Plone Intranet: -- [Invitations]"
      description="Invite users to a plone site using a unique URL"
      provides="Products.GenericSetup.interfaces.EXTENSION"
      directory="profiles/default"
      />

  <genericsetup:registerProfile
      name="uninstall"
      title="Plone Intranet: -- [Invitations uninstall]"
      description="Uninstall the ploneintranet.invitations package"
      provides="Products.GenericSetup.interfaces.EXTENSION"
      directory="profiles/uninstall"
      />

</configure>
