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

  <permission>Access contents information</permission>
  <permission>View</permission>
  <permission>Modify portal content</permission>
  <permission>Delete objects</permission>
  <permission>Add portal content</permission>
  <permission>Plone Social: Add Microblog Status Update</permission>
  <permission>Plone Social: View Microblog Status Update</permission>
  <permission>Plone Social: Modify Microblog Status Update</permission>
  <permission>Plone Social: Delete Microblog Status Update</permission>
  <!--
      Modify Own Status Update and Delete Own Status Update are acquired
      unchanged from sitewide configuration.
  -->
  <state state_id="secret"
         title="Secret"
         i18n:attributes="title"
  >
    <description i18n:translate="">Secret Workspaces cannot be seen or accessed by Guests.</description>
    <permission-map acquired="False"
                    name="Access contents information"
    >
      <permission-role>Manager</permission-role>
      <permission-role>Site Administrator</permission-role>
      <permission-role>TeamMember</permission-role>
      <permission-role>TeamManager</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="View"
    >
      <permission-role>Manager</permission-role>
      <permission-role>Site Administrator</permission-role>
      <permission-role>TeamMember</permission-role>
      <permission-role>TeamManager</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="Modify portal content"
    >
      <permission-role>Manager</permission-role>
      <permission-role>Site Administrator</permission-role>
      <permission-role>TeamManager</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="Delete objects"
    >
      <permission-role>Manager</permission-role>
      <permission-role>Site Administrator</permission-role>
      <permission-role>TeamManager</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="Add portal content"
    >
      <permission-role>Manager</permission-role>
      <permission-role>Site Administrator</permission-role>
      <permission-role>TeamManager</permission-role>
      <permission-role>Contributor</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="Plone Social: Add Microblog Status Update"
    >
      <permission-role>Manager</permission-role>
      <permission-role>Site Administrator</permission-role>
      <permission-role>TeamMember</permission-role>
      <permission-role>TeamManager</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="Plone Social: View Microblog Status Update"
    >
      <permission-role>Manager</permission-role>
      <permission-role>Site Administrator</permission-role>
      <permission-role>TeamMember</permission-role>
      <permission-role>TeamManager</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="Plone Social: Modify Microblog Status Update"
    >
      <permission-role>Manager</permission-role>
      <permission-role>Site Administrator</permission-role>
      <!--permission-role>TeamMember</permission-role-->
      <permission-role>TeamManager</permission-role>
    </permission-map>
    <permission-map acquired="False"
                    name="Plone Social: Delete Microblog Status Update"
    >
      <permission-role>Manager</permission-role>
      <permission-role>Site Administrator</permission-role>
      <!--permission-role>TeamMember</permission-role-->
      <permission-role>TeamManager</permission-role>
    </permission-map>
  </state>

  <variable for_catalog="False"
            for_status="True"
            update_always="True"
            variable_id="action"
  >
    <description i18n:translate="">Previous transition</description>
    <default>
      <expression>transition/getId|nothing</expression>
    </default>
    <guard>
</guard>
  </variable>
  <variable for_catalog="False"
            for_status="True"
            update_always="True"
            variable_id="actor"
  >
    <description i18n:translate="">The ID of the user who performed the previous transition</description>
    <default>
      <expression>user/getId</expression>
    </default>
    <guard>
</guard>
  </variable>
  <variable for_catalog="False"
            for_status="True"
            update_always="True"
            variable_id="comments"
  >
    <description i18n:translate="">Comment about the last transition</description>
    <default>
      <expression>python:state_change.kwargs.get('comment', '')</expression>
    </default>
    <guard>
</guard>
  </variable>
  <variable for_catalog="False"
            for_status="False"
            update_always="False"
            variable_id="review_history"
  >
    <description i18n:translate="">Provides access to workflow history</description>
    <default>
      <expression>state_change/getHistory</expression>
    </default>
    <guard>
      <guard-permission>Request review</guard-permission>
      <guard-permission>Review portal content</guard-permission>
    </guard>
  </variable>
  <variable for_catalog="False"
            for_status="True"
            update_always="True"
            variable_id="time"
  >
    <description i18n:translate="">When the previous transition was performed</description>
    <default>
      <expression>state_change/getDateTime</expression>
    </default>
    <guard>
</guard>
  </variable>
</dc-workflow>
