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

  <allow
      interface="schooltool.timetable.interfaces.ITimetableContainer"
      crowds="administration everybody"
      permission="schooltool.view" />
  <allow
      interface="schooltool.timetable.interfaces.ITimetableContainer"
      crowds="administration"
      permission="schooltool.edit" />

  <crowd
      name="schedule_viewers"
      factory=".app.ScheduleViewersCrowd" />

  <zope:adapter
      trusted="yes"
      factory=".app.SectionScheduleViewers"
      provides="schooltool.timetable.interfaces.IScheduleParentCrowd"
      name="schooltool.view" />

  <allow
      interface="schooltool.timetable.interfaces.IScheduleContainer"
      crowds="administration schedule_viewers"
      permission="schooltool.view" />

  <allow
      interface="schooltool.timetable.interfaces.IScheduleContainer"
      crowds="administration"
      permission="schooltool.edit" />

  <!-- Security descriptions -->

  <describe_group name="schooltool.timetable" title="School timetables" />

  <describe_action
     group="schooltool.timetable" name="list" title="List/Search"
     order="10"
     interface="schooltool.timetable.interfaces.ITimetableContainer"
     permission="schooltool.view"
  />

  <describe_action
     group="schooltool.timetable" name="create_delete" title="Create/Delete"
     order="20"
     interface="schooltool.timetable.interfaces.ITimetableContainer"
     permission="schooltool.edit"
  />

  <describe_action
     group="schooltool.timetable" name="view" title="View"
     order="30"
     interface="schooltool.timetable.interfaces.ITimetableContainer"
     permission="schooltool.view"
  />

  <describe_action
     group="schooltool.timetable" name="modify" title="Modify"
     order="40"
     interface="schooltool.timetable.interfaces.ITimetableContainer"
     permission="schooltool.edit"
  />

</configure>
