<?xml version="1.0" encoding="utf-8"?>
<dc-workflow xmlns:i18n="http://xml.zope.org/namespaces/i18n"
             description="- Workspace Container Workflow"
             initial_state="open"
             manager_bypass="False"
             state_variable="review_state"
             title="Ploneintranet Workspace Container Workflow"
             workflow_id="ploneintranet_workspacecontainer_workflow"
             i18n:attributes="title; description"
             i18n:domain="ploneintranet"
>

  <permission>Add portal content</permission>
  <permission>Access contents information</permission>
  <permission>List folder contents</permission>
  <permission>View</permission>

  <state state_id="open"
         title="Open"
         i18n:attributes="title"
  >
    <description i18n:translate="">Visible to all authenticated, adding only for Members</description>
    <exit-transition transition_id="restrict" />
    <permission-map acquired="False"
                    name="Add portal content"
    >
      <permission-role>Manager</permission-role>
      <permission-role>Owner</permission-role>
      <permission-role>Contributor</permission-role>
      <permission-role>Site Administrator</permission-role>
      <permission-role>Member</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="Access contents information"
    >
      <permission-role>Authenticated</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="List folder contents"
    >
      <permission-role>Authenticated</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="View"
    >
      <permission-role>Authenticated</permission-role>
    </permission-map>
  </state>

  <state state_id="restricted"
         title="Restricted"
         i18n:attributes="title"
  >
    <description i18n:translate="">Visible to all authenticated, adding only for Contributors.</description>
    <exit-transition transition_id="make_open" />
    <permission-map acquired="False"
                    name="Add portal content"
    >
      <permission-role>Manager</permission-role>
      <permission-role>Owner</permission-role>
      <permission-role>Contributor</permission-role>
      <permission-role>Site Administrator</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="Access contents information"
    >
      <permission-role>Authenticated</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="List folder contents"
    >
      <permission-role>Authenticated</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="View"
    >
      <permission-role>Authenticated</permission-role>
    </permission-map>
  </state>



  <transition after_script=""
              before_script=""
              new_state="restricted"
              title="Admin restricts workspace container"
              transition_id="restrict"
              trigger="USER"
              i18n:attributes="title"
  >
    <description i18n:translate="">Only Editors and Contributors will be able to create workspaces.</description>
    <action category="workflow"
            icon=""
            url="%(content_url)s/content_status_modify?workflow_action=restrict"
            i18n:translate=""
    >Restrict</action>
    <guard>
      <guard-permission>Manage portal</guard-permission>
    </guard>
  </transition>

  <transition after_script=""
              before_script=""
              new_state="open"
              title="Admin makes workspace container open"
              transition_id="make_open"
              trigger="USER"
              i18n:attributes="title"
  >
    <description i18n:translate="">All authenticated members will be able to create workspaces.</description>
    <action category="workflow"
            icon=""
            url="%(content_url)s/content_status_modify?workflow_action=open"
            i18n:translate=""
    >Make Open</action>
    <guard>
      <guard-permission>Manage portal</guard-permission>
    </guard>
  </transition>

</dc-workflow>
