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

  <!-- security -->

  <setting
      key="everyone_can_view_resource_list"
      text="Everyone can view resource lists."
      default="False" />

  <setting
      key="everyone_can_view_resource_info"
      text="Everyone can view resource information."
      default="False" />

  <setting
      key="everyone_can_view_resource_calendar"
      text="Everyone can view resource calendars."
      default="False" />

  <crowd
      name="resource_viewers"
      factory=".resource.ResourceViewersCrowd" />

  <crowd
      name="resource_list_viewers"
      factory=".resource.ResourceContainerViewersCrowd" />

  <allow
      interface="schooltool.resource.interfaces.IResourceContainer"
      crowds="administration resource_list_viewers authenticated"
      permission="schooltool.view" />
  <allow
      interface="schooltool.resource.interfaces.IResourceContainer"
      crowds="administration"
      permission="schooltool.edit" />

  <allow
      interface="schooltool.resource.interfaces.IBaseResource"
      crowds="administration leaders resource_viewers authenticated"
      permission="schooltool.view" />
  <allow
      interface="schooltool.resource.interfaces.IBaseResource"
      crowds="administration leaders"
      permission="schooltool.edit" />

  <zope:adapter
      factory=".resource.ResourceCalendarViewersCrowd"
      provides="schooltool.app.security.ICalendarParentCrowd"
      name="schooltool.view" />
  <zope:adapter
      factory=".resource.ResourceCalendarEditorsCrowd"
      provides="schooltool.app.security.ICalendarParentCrowd"
      name="schooltool.edit" />

</configure>
