Fix test (set global allow to true for tasks types in testing profile)
This commit is contained in:
parent
188f3bb281
commit
a5330db0d2
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0"?>
|
||||
<object name="portal_types" meta_type="Plone Types Tool">
|
||||
<property name="title">Controls the available content types in your portal</property>
|
||||
<object name="information" meta_type="Dexterity FTI"/>
|
||||
<object name="opinion" meta_type="Dexterity FTI"/>
|
||||
<object name="task" meta_type="Dexterity FTI"/>
|
||||
<object name="validation" meta_type="Dexterity FTI"/>
|
||||
</object>
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0"?>
|
||||
<object name="information" meta_type="Dexterity FTI" i18n:domain="collective.task"
|
||||
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
|
||||
<property name="title" i18n:translate="">Information</property>
|
||||
<property name="description" i18n:translate=""></property>
|
||||
<property name="icon_expr">string:${portal_url}/++resource++collective.task/task_icon.png</property>
|
||||
<property name="factory">information</property>
|
||||
<property name="add_view_expr">string:${folder_url}/@@add_information</property>
|
||||
<property name="link_target"></property>
|
||||
<property name="immediate_view">view</property>
|
||||
<property name="global_allow">True</property>
|
||||
<property name="filter_content_types">True</property>
|
||||
<property name="allow_discussion">False</property>
|
||||
<property name="default_view">view</property>
|
||||
<property name="view_methods">
|
||||
<element value="view"/>
|
||||
</property>
|
||||
<property name="default_view_fallback">False</property>
|
||||
<property name="add_permission">cmf.AddPortalContent</property>
|
||||
<property name="schema">collective.task.content.IInformation</property>
|
||||
<property name="klass">collective.task.content.Information</property>
|
||||
<property name="behaviors">
|
||||
<element value="plone.app.content.interfaces.INameFromTitle"/>
|
||||
</property>
|
||||
|
||||
<alias from="(Default)" to="(dynamic view)"/>
|
||||
<alias from="edit" to="@@edit"/>
|
||||
<alias from="sharing" to="@@sharing"/>
|
||||
<alias from="view" to="(selected layout)"/>
|
||||
|
||||
<action title="View" action_id="view" category="object" condition_expr=""
|
||||
description="" icon_expr="" link_target="" url_expr="string:${object_url}"
|
||||
visible="True">
|
||||
<permission value="View"/>
|
||||
</action>
|
||||
<action title="Edit" action_id="edit" category="object" condition_expr=""
|
||||
description="" icon_expr="" link_target=""
|
||||
url_expr="string:${object_url}/edit" visible="True">
|
||||
<permission value="Modify portal content"/>
|
||||
</action>
|
||||
</object>
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0"?>
|
||||
<object name="opinion" meta_type="Dexterity FTI" i18n:domain="collective.task"
|
||||
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
|
||||
<property name="title" i18n:translate="">Opinion</property>
|
||||
<property name="description" i18n:translate=""></property>
|
||||
<property name="icon_expr">string:${portal_url}/++resource++collective.task/task_icon.png</property>
|
||||
<property name="factory">opinion</property>
|
||||
<property name="add_view_expr">string:${folder_url}/++add++opinion</property>
|
||||
<property name="link_target"></property>
|
||||
<property name="immediate_view">view</property>
|
||||
<property name="global_allow">True</property>
|
||||
<property name="filter_content_types">True</property>
|
||||
<property name="allow_discussion">True</property>
|
||||
<property name="default_view">view</property>
|
||||
<property name="view_methods">
|
||||
<element value="view"/>
|
||||
</property>
|
||||
<property name="default_view_fallback">False</property>
|
||||
<property name="add_permission">cmf.AddPortalContent</property>
|
||||
<property name="schema">collective.task.content.IOpinion</property>
|
||||
<property name="klass">collective.task.content.Opinion</property>
|
||||
<property name="behaviors">
|
||||
<element value="plone.app.content.interfaces.INameFromTitle"/>
|
||||
<element value="collective.task.behaviors.ITarget"/>
|
||||
</property>
|
||||
|
||||
<alias from="(Default)" to="(dynamic view)"/>
|
||||
<alias from="edit" to="@@edit"/>
|
||||
<alias from="sharing" to="@@sharing"/>
|
||||
<alias from="view" to="(selected layout)"/>
|
||||
|
||||
<action title="View" action_id="view" category="object" condition_expr=""
|
||||
description="" icon_expr="" link_target="" url_expr="string:${object_url}"
|
||||
visible="True">
|
||||
<permission value="View"/>
|
||||
</action>
|
||||
<action title="Edit" action_id="edit" category="object" condition_expr=""
|
||||
description="" icon_expr="" link_target=""
|
||||
url_expr="string:${object_url}/edit" visible="True">
|
||||
<permission value="Modify portal content"/>
|
||||
</action>
|
||||
</object>
|
|
@ -0,0 +1,44 @@
|
|||
<?xml version="1.0"?>
|
||||
<object name="task" meta_type="Dexterity FTI" i18n:domain="collective.task"
|
||||
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
|
||||
<property name="title" i18n:translate="">Task</property>
|
||||
<property name="description" i18n:translate=""></property>
|
||||
<property name="icon_expr">string:${portal_url}/++resource++collective.task/task_icon.png</property>
|
||||
<property name="factory">task</property>
|
||||
<property name="add_view_expr">string:${folder_url}/++add++task</property>
|
||||
<property name="link_target"></property>
|
||||
<property name="immediate_view">view</property>
|
||||
<property name="global_allow">True</property>
|
||||
<property name="filter_content_types">True</property>
|
||||
<property name="allowed_content_types">
|
||||
<element value="task"/>
|
||||
</property>
|
||||
<property name="allow_discussion">True</property>
|
||||
<property name="default_view">view</property>
|
||||
<property name="view_methods">
|
||||
<element value="view"/>
|
||||
</property>
|
||||
<property name="default_view_fallback">False</property>
|
||||
<property name="add_permission">cmf.AddPortalContent</property>
|
||||
<property name="schema">collective.task.content.ITask</property>
|
||||
<property name="klass">collective.task.content.Task</property>
|
||||
<property name="behaviors">
|
||||
<element value="plone.app.content.interfaces.INameFromTitle"/>
|
||||
</property>
|
||||
|
||||
<alias from="(Default)" to="(dynamic view)"/>
|
||||
<alias from="edit" to="@@edit"/>
|
||||
<alias from="sharing" to="@@sharing"/>
|
||||
<alias from="view" to="(selected layout)"/>
|
||||
|
||||
<action title="View" action_id="view" category="object" condition_expr=""
|
||||
description="" icon_expr="" link_target="" url_expr="string:${object_url}"
|
||||
visible="True">
|
||||
<permission value="View"/>
|
||||
</action>
|
||||
<action title="Edit" action_id="edit" category="object" condition_expr=""
|
||||
description="" icon_expr="" link_target=""
|
||||
url_expr="string:${object_url}/edit" visible="True">
|
||||
<permission value="Modify portal content"/>
|
||||
</action>
|
||||
</object>
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0"?>
|
||||
<object name="validation" meta_type="Dexterity FTI" i18n:domain="collective.task"
|
||||
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
|
||||
<property name="title" i18n:translate="">Validation</property>
|
||||
<property name="description" i18n:translate=""></property>
|
||||
<property name="icon_expr">string:${portal_url}/++resource++collective.task/task_icon.png</property>
|
||||
<property name="factory">validation</property>
|
||||
<property name="add_view_expr">string:${folder_url}/++add++validation</property>
|
||||
<property name="link_target"></property>
|
||||
<property name="immediate_view">view</property>
|
||||
<property name="global_allow">True</property>
|
||||
<property name="filter_content_types">True</property>
|
||||
<property name="allow_discussion">True</property>
|
||||
<property name="default_view">view</property>
|
||||
<property name="view_methods">
|
||||
<element value="view"/>
|
||||
</property>
|
||||
<property name="default_view_fallback">False</property>
|
||||
<property name="add_permission">cmf.AddPortalContent</property>
|
||||
<property name="schema">collective.task.content.IValidation</property>
|
||||
<property name="klass">collective.task.content.Validation</property>
|
||||
<property name="behaviors">
|
||||
<element value="plone.app.content.interfaces.INameFromTitle"/>
|
||||
<element value="collective.task.behaviors.ITarget"/>
|
||||
</property>
|
||||
|
||||
<alias from="(Default)" to="(dynamic view)"/>
|
||||
<alias from="edit" to="@@edit"/>
|
||||
<alias from="sharing" to="@@sharing"/>
|
||||
<alias from="view" to="(selected layout)"/>
|
||||
|
||||
<action title="View" action_id="view" category="object" condition_expr=""
|
||||
description="" icon_expr="" link_target="" url_expr="string:${object_url}"
|
||||
visible="True">
|
||||
<permission value="View"/>
|
||||
</action>
|
||||
<action title="Edit" action_id="edit" category="object" condition_expr=""
|
||||
description="" icon_expr="" link_target=""
|
||||
url_expr="string:${object_url}/edit" visible="True">
|
||||
<permission value="Modify portal content"/>
|
||||
</action>
|
||||
</object>
|
|
@ -39,7 +39,7 @@ class CollectiveTaskLayer(PloneSandboxLayer):
|
|||
def setUpPloneSite(self, portal):
|
||||
"""Set up Plone."""
|
||||
# Install into Plone site using portal_setup
|
||||
applyProfile(portal, 'collective.task:default')
|
||||
applyProfile(portal, 'collective.task:testing')
|
||||
|
||||
# create users
|
||||
memberhelpers.createMembers(portal, USERDEFS)
|
||||
|
|
Reference in New Issue