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

  <permission
      id="zope.Public"
      title="[public-permission] Public"
      description="Special permission indicating unconditional access.
                   Public resources are always accessible."
      />

  <vocabulary
      name="Permissions"
      factory="zope.app.component.vocabulary.UtilityVocabulary"
      interface="zope.security.interfaces.IPermission" />

  <vocabulary
      name="Permission Ids"
      factory=".vocabulary.PermissionIdsVocabulary" />

  <include file="globalmodules.zcml" />
  <include file="_protections.zcml" />

  <utility
      provides=".interfaces.IAuthentication"
      component=".principalregistry.principalRegistry" />

  <localUtility class=".permission.LocalPermission">
    <factory
        id="zope.app.security.Permission"
        />
    <allow
        interface=".interfaces.IPermission"
        />
    <require
        permission="zope.Security"
        set_schema=".interfaces.IPermission"
        />
  </localUtility>

  <subscriber
     for="zope.security.interfaces.IPermission
          ..component.interfaces.registration.IRegistrationActivatedEvent"
     handler=".permission.setIdOnActivation"
     />

  <subscriber
     for="zope.security.interfaces.IPermission
          ..component.interfaces.registration.IRegistrationDeactivatedEvent"
     handler=".permission.unsetIdOnDeactivation"
     />

  <content class=".permission.Permission">
    <allow interface=".interfaces.IPermission" />
  </content>

  <content class=".principalregistry.Principal">
    <allow interface=".interfaces.IPrincipal" />
  </content>

  <content class=".settings.PermissionSetting">
    <require permission="zope.Public"
             attributes="getName getDescription __str__" />
  </content>

  <adapter factory=".NoLogout" />

  <!-- Standard Permissions -->

  <permission
      id="zope.View"
      title="[view-permission] View"
      />

  <permission
      id="zope.Security"
      title="[change-security-settings-permission] Change security settings"
      />

  <permission
      id="zope.ManageContent"
      title="[manage-content-permission] Manage Content"
      />

  <permission
      id="zope.ManageBindings"
      title="[manage-service-bindings-permission] Manage Service Bindings"
      />

  <permission
      id="zope.ManageCode"
      title="[manage-code-permission] Manage Code"
      description="Manage executable code, including Python, SQL, ZPT, etc."
      />

  <permission
      id="zope.ManageServices"
      title="[manage-services-permission] Manage Services"
      />

  <permission
      id="zope.ManageSite"
      title="[manage-site-permission] Manage Site"
      />

  <permission
      id="zope.ManagePrincipals"
      title="[manage-principal-permission] Manage Principals"
      />

  <permission
      id="zope.ManageApplication"
      title="[manage-application-permission] Manage Application"
      description="Manage the Zope Application, such as Restart/Shutdown or
                   packing the ZODB."
      />

  <adapter
      factory=".basicauthadapter.BasicAuthAdapter"
      provides=".interfaces.ILoginPassword"
      for="zope.publisher.interfaces.http.IHTTPCredentials"
      />

  <adapter
      factory=".ftpauth.FTPAuth"
      provides=".interfaces.ILoginPassword"
      for="zope.publisher.interfaces.ftp.IFTPCredentials"
      />

  <adapter
      factory=".principallogging.PrincipalLogging"
      provides="zope.publisher.interfaces.logginginfo.ILoggingInfo"
      for=".interfaces.IPrincipal"
      />

</configure>

