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

  <setting
      key="everyone_can_view_group_list"
      text="Everyone can view group lists."
      default="False" />

  <setting
      key="everyone_can_view_group_info"
      text="Everyone can view group information."
      default="False" />

  <setting
      key="everyone_can_view_group_calendar"
      text="Everyone can view group calendars."
      default="False" />

  <setting
      key="members_can_edit_group_calendar"
      text="Group members can edit group calendars."
      default="False" />

  <crowd
      name="group_viewers"
      factory=".group.GroupViewersCrowd" />

  <crowd
      name="group_instructors"
      factory=".group.GroupInstructorsCrowd" />

  <crowd
      name="group_list_viewers"
      factory=".group.GroupContainerViewersCrowd" />

  <allow
      interface="schooltool.group.interfaces.IGroupContainer"
      crowds="administration group_list_viewers"
      permission="schooltool.view" />
  <allow
      interface="schooltool.group.interfaces.IGroupContainer"
      crowds="administration"
      permission="schooltool.edit" />

  <allow
      interface="schooltool.group.interfaces.IGroup"
      crowds="administration leaders group_viewers group_instructors"
      permission="schooltool.view" />
  <allow
      interface="schooltool.group.interfaces.IGroup"
      crowds="administration leaders"
      permission="schooltool.edit" />

  <zope:adapter
      factory=".group.GroupCalendarViewersCrowd"
      provides="schooltool.app.interfaces.ICalendarParentCrowd"
      name="schooltool.view" />

  <zope:adapter
      factory=".group.GroupCalendarEditorsCrowd"
      provides="schooltool.app.interfaces.ICalendarParentCrowd"
      name="schooltool.edit" />

</configure>
