<?xml version="1.0"?>
<configure xmlns="http://schooltool.org/securitypolicy"
           xmlns:zope="http://namespaces.zope.org/zope">

  <zope:adapter
      for=".interfaces.IRequirement"
      factory=".security.RequirementRequirementViewersCrowd"
      provides=".security.IRequirementParentCrowd"
      name="schooltool.view" />

  <zope:adapter
      for=".interfaces.IRequirement"
      factory=".security.RequirementRequirementEditorsCrowd"
      provides=".security.IRequirementParentCrowd"
      name="schooltool.edit" />

  <zope:adapter
      for="schooltool.course.interfaces.ICourse"
      factory=".security.CourseRequirementViewersCrowd"
      provides=".security.IRequirementParentCrowd"
      name="schooltool.view" />

  <zope:adapter
      for="schooltool.course.interfaces.ICourse"
      factory=".security.CourseRequirementEditorsCrowd"
      provides=".security.IRequirementParentCrowd"
      name="schooltool.edit" />

  <zope:adapter
      for="schooltool.course.interfaces.ISection"
      factory=".security.SectionRequirementViewersCrowd"
      provides=".security.IRequirementParentCrowd"
      name="schooltool.view" />

  <zope:adapter
      for="schooltool.course.interfaces.ISection"
      factory=".security.SectionRequirementEditorsCrowd"
      provides=".security.IRequirementParentCrowd"
      name="schooltool.edit" />

  <crowd
      name="requirement_viewers"
      factory=".security.RequirementViewersCrowd" />

  <crowd
      name="requirement_editors"
      factory=".security.RequirementEditorsCrowd" />

  <allow
      interface=".interfaces.IRequirement"
      permission="schooltool.view"
      crowds="administration requirement_viewers" />

  <allow
      interface=".interfaces.IRequirement"
      permission="schooltool.edit"
      crowds="administration requirement_editors" />

</configure>
