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

  <!-- Security descriptions -->

  <describe_group
     name="schooltool.intervention"
     title="Interventions" />

  <describe_action
     group="schooltool.intervention" name="view_student"
     title="View Student"
     description="View intervention data for a student."
     order="20"
     interface=".interfaces.IInterventionStudentMarker"
     permission="schooltool.view"
  />

  <describe_action
     group="schooltool.intervention" name="edit_student"
     title="Edit Student"
     description="Create and edit intervention data for a student."
     order="30"
     interface=".interfaces.IInterventionStudentMarker"
     permission="schooltool.edit"
  />

  <describe_action
     group="schooltool.intervention" name="view_intervention"
     title="View Intervention"
     description="View a specific message or goal."
     order="40"
     interface=".interfaces.IInterventionMarker"
     permission="schooltool.view"
  />

  <describe_action
     group="schooltool.intervention" name="edit_intervention"
     title="Edit Intervention"
     description="Edit a specific message or goal."
     order="50"
     interface=".interfaces.IInterventionMarker"
     permission="schooltool.edit"
  />

  <crowd
    name="intervention_instructors"
    factory=".intervention.InterventionInstructorsCrowd" />

  <crowd
    name="intervention_advisors"
    factory=".intervention.InterventionAdvisorsCrowd" />

  <crowd
    name="staff_responsible"
    factory=".intervention.StaffResponsibleCrowd" />

  <crowd
    name="student_responsible"
    factory=".intervention.StudentResponsibleCrowd" />

  <allow
     interface=".interfaces.IInterventionRootMarker"
     crowds="everybody"
     permission="schooltool.view" />

  <allow
     interface=".interfaces.IInterventionStudentMarker"
     crowds="administration intervention_instructors intervention_advisors"
     permission="schooltool.view" />

  <allow
     interface=".interfaces.IInterventionStudentMarker"
     crowds="administration intervention_instructors intervention_advisors"
     permission="schooltool.edit" />

  <allow
     interface=".interfaces.IInterventionMarker"
     crowds="administration intervention_instructors intervention_advisors
             staff_responsible student_responsible"
     permission="schooltool.view" />

  <allow
     interface=".interfaces.IInterventionMarker"
     crowds="administration intervention_instructors intervention_advisors
             staff_responsible"
     permission="schooltool.edit" />

</configure>
