From d19b15219b0fe2459d452baac25d53552130f5fb Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Mon, 22 Nov 2010 13:48:36 +0000
Subject: [PATCH] This business template is for SSO with OpenAM.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40465 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../System%20Preference/openam_preference.xml |  81 +++++
 .../ExtensionTemplateItem/OpenAMLogout.py     |  33 ++
 .../portal_skins/erp5_sso_openam.xml          |  47 +++
 .../erp5_sso_openam/OpenAMLogout.xml          |  28 ++
 ...stemPreference_viewOpenAMConfiguration.xml | 153 ++++++++++
 .../my_preferred_openam_logout_url.xml        |  96 ++++++
 .../my_preferred_openam_token_id.xml          |  96 ++++++
 .../portal_skins/erp5_sso_openam/logout.xml   | 289 ++++++++++++++++++
 bt5/erp5_sso_openam/bt/change_log             |   2 +
 bt5/erp5_sso_openam/bt/copyright_list         |   1 +
 bt5/erp5_sso_openam/bt/description            |   1 +
 bt5/erp5_sso_openam/bt/license                |   1 +
 bt5/erp5_sso_openam/bt/maintainer_list        |   1 +
 bt5/erp5_sso_openam/bt/revision               |   1 +
 .../bt/template_action_path_list              |   1 +
 .../bt/template_extension_id_list             |   1 +
 .../bt/template_format_version                |   1 +
 bt5/erp5_sso_openam/bt/template_skin_id_list  |   1 +
 bt5/erp5_sso_openam/bt/title                  |   1 +
 bt5/erp5_sso_openam/bt/version                |   1 +
 20 files changed, 836 insertions(+)
 create mode 100644 bt5/erp5_sso_openam/ActionTemplateItem/portal_types/System%20Preference/openam_preference.xml
 create mode 100644 bt5/erp5_sso_openam/ExtensionTemplateItem/OpenAMLogout.py
 create mode 100644 bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam.xml
 create mode 100644 bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/OpenAMLogout.xml
 create mode 100644 bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/SystemPreference_viewOpenAMConfiguration.xml
 create mode 100644 bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/SystemPreference_viewOpenAMConfiguration/my_preferred_openam_logout_url.xml
 create mode 100644 bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/SystemPreference_viewOpenAMConfiguration/my_preferred_openam_token_id.xml
 create mode 100644 bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/logout.xml
 create mode 100644 bt5/erp5_sso_openam/bt/change_log
 create mode 100644 bt5/erp5_sso_openam/bt/copyright_list
 create mode 100644 bt5/erp5_sso_openam/bt/description
 create mode 100644 bt5/erp5_sso_openam/bt/license
 create mode 100644 bt5/erp5_sso_openam/bt/maintainer_list
 create mode 100644 bt5/erp5_sso_openam/bt/revision
 create mode 100644 bt5/erp5_sso_openam/bt/template_action_path_list
 create mode 100644 bt5/erp5_sso_openam/bt/template_extension_id_list
 create mode 100644 bt5/erp5_sso_openam/bt/template_format_version
 create mode 100644 bt5/erp5_sso_openam/bt/template_skin_id_list
 create mode 100644 bt5/erp5_sso_openam/bt/title
 create mode 100644 bt5/erp5_sso_openam/bt/version

diff --git a/bt5/erp5_sso_openam/ActionTemplateItem/portal_types/System%20Preference/openam_preference.xml b/bt5/erp5_sso_openam/ActionTemplateItem/portal_types/System%20Preference/openam_preference.xml
new file mode 100644
index 0000000000..691180c38e
--- /dev/null
+++ b/bt5/erp5_sso_openam/ActionTemplateItem/portal_types/System%20Preference/openam_preference.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>action</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>categories</string> </key>
+            <value>
+              <tuple>
+                <string>action_type/object_view</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>category</string> </key>
+            <value> <string>object_view</string> </value>
+        </item>
+        <item>
+            <key> <string>condition</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>openam_preference</string> </value>
+        </item>
+        <item>
+            <key> <string>permissions</string> </key>
+            <value>
+              <tuple>
+                <string>View</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>priority</string> </key>
+            <value> <float>9.0</float> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>OpenAM</string> </value>
+        </item>
+        <item>
+            <key> <string>visible</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="Expression" module="Products.CMFCore.Expression"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>text</string> </key>
+            <value> <string>string:${object_url}/SystemPreference_viewOpenAMConfiguration</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_sso_openam/ExtensionTemplateItem/OpenAMLogout.py b/bt5/erp5_sso_openam/ExtensionTemplateItem/OpenAMLogout.py
new file mode 100644
index 0000000000..6efe3d8523
--- /dev/null
+++ b/bt5/erp5_sso_openam/ExtensionTemplateItem/OpenAMLogout.py
@@ -0,0 +1,33 @@
+#############################################################################
+#
+# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+##############################################################################
+
+from urllib import urlencode
+from urllib2 import urlopen
+
+def OpenAMLogout(self, url, token):
+  code = urlopen(url, urlencode({'subjectid':token})).getcode()
+  return code == 200
diff --git a/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam.xml b/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam.xml
new file mode 100644
index 0000000000..939951fcf9
--- /dev/null
+++ b/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Folder" module="OFS.Folder"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_local_properties</string> </key>
+            <value>
+              <tuple>
+                <dictionary>
+                  <item>
+                      <key> <string>id</string> </key>
+                      <value> <string>business_template_skin_layer_priority</string> </value>
+                  </item>
+                  <item>
+                      <key> <string>type</string> </key>
+                      <value> <string>float</string> </value>
+                  </item>
+                </dictionary>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>_objects</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>business_template_skin_layer_priority</string> </key>
+            <value> <float>30.0</float> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>erp5_sso_openam</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>OpenAM SSO</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/OpenAMLogout.xml b/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/OpenAMLogout.xml
new file mode 100644
index 0000000000..3368c61625
--- /dev/null
+++ b/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/OpenAMLogout.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_function</string> </key>
+            <value> <string>OpenAMLogout</string> </value>
+        </item>
+        <item>
+            <key> <string>_module</string> </key>
+            <value> <string>OpenAMLogout</string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>OpenAMLogout</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/SystemPreference_viewOpenAMConfiguration.xml b/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/SystemPreference_viewOpenAMConfiguration.xml
new file mode 100644
index 0000000000..49e16ac335
--- /dev/null
+++ b/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/SystemPreference_viewOpenAMConfiguration.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="ERP5Form" module="Products.ERP5Form.Form"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary/>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_objects</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>action</string> </key>
+            <value> <string>Base_edit</string> </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>edit_order</string> </key>
+            <value>
+              <list/>
+            </value>
+        </item>
+        <item>
+            <key> <string>encoding</string> </key>
+            <value> <string>UTF-8</string> </value>
+        </item>
+        <item>
+            <key> <string>enctype</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>group_list</string> </key>
+            <value>
+              <list>
+                <string>left</string>
+                <string>right</string>
+                <string>center</string>
+                <string>bottom</string>
+                <string>hidden</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>groups</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>bottom</string> </key>
+                    <value>
+                      <list/>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>center</string> </key>
+                    <value>
+                      <list>
+                        <string>my_preferred_openam_logout_url</string>
+                        <string>my_preferred_openam_token_id</string>
+                      </list>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value>
+                      <list/>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>left</string> </key>
+                    <value>
+                      <list/>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>right</string> </key>
+                    <value>
+                      <list/>
+                    </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>SystemPreference_viewOpenAMConfiguration</string> </value>
+        </item>
+        <item>
+            <key> <string>method</string> </key>
+            <value> <string>POST</string> </value>
+        </item>
+        <item>
+            <key> <string>name</string> </key>
+            <value> <string>/SystemPreference_viewOpenAMConfiguration</string> </value>
+        </item>
+        <item>
+            <key> <string>pt</string> </key>
+            <value> <string>form_view</string> </value>
+        </item>
+        <item>
+            <key> <string>row_length</string> </key>
+            <value> <int>4</int> </value>
+        </item>
+        <item>
+            <key> <string>stored_encoding</string> </key>
+            <value> <string>UTF-8</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>OpenAM</string> </value>
+        </item>
+        <item>
+            <key> <string>unicode_mode</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>update_action</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>update_action_title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/SystemPreference_viewOpenAMConfiguration/my_preferred_openam_logout_url.xml b/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/SystemPreference_viewOpenAMConfiguration/my_preferred_openam_logout_url.xml
new file mode 100644
index 0000000000..4b2c0d5ffd
--- /dev/null
+++ b/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/SystemPreference_viewOpenAMConfiguration/my_preferred_openam_logout_url.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>delegated_list</string> </key>
+            <value>
+              <list>
+                <string>title</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>my_preferred_openam_logout_url</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string>my_string_field</string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string>Base_viewFieldLibrary</string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string>Click to edit the target</string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>Logout URL</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/SystemPreference_viewOpenAMConfiguration/my_preferred_openam_token_id.xml b/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/SystemPreference_viewOpenAMConfiguration/my_preferred_openam_token_id.xml
new file mode 100644
index 0000000000..54b1c7ddf2
--- /dev/null
+++ b/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/SystemPreference_viewOpenAMConfiguration/my_preferred_openam_token_id.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>delegated_list</string> </key>
+            <value>
+              <list>
+                <string>title</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>my_preferred_openam_token_id</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string>my_string_field</string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string>Base_viewFieldLibrary</string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string>Click to edit the target</string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>Token ID</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/logout.xml b/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/logout.xml
new file mode 100644
index 0000000000..ed7edde4fc
--- /dev/null
+++ b/bt5/erp5_sso_openam/SkinTemplateItem/portal_skins/erp5_sso_openam/logout.xml
@@ -0,0 +1,289 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="CustomizedPythonScript" module="Products.CMFCore.FSPythonScript"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>_Access_contents_information_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_Change_bindings_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_Change_cache_settings_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_Change_permissions_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_Copy_or_Move_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_Delete_objects_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_Manage_WebDAV_Locks_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_Manage_properties_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_Take_ownership_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_Undo_changes_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_View_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_View_management_screens_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_WebDAV_Lock_items_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_WebDAV_Unlock_items_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_WebDAV_access_Permission</string> </key>
+            <value>
+              <list>
+                <string>Manager</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>REQUEST = context.REQUEST\n
+portal = context.getPortalObject()\n
+if REQUEST.has_key(\'portal_skin\'):\n
+   portal.portal_skins.clearSkinCookie()\n
+REQUEST.RESPONSE.expireCookie(\'__ac\', path=\'/\')\n
+getPreference = portal.portal_preferences.getPreference\n
+logout_url = getPreference(\'preferred_openam_logout_url\')\n
+token_id = getPreference(\'preferred_openam_token_id\')\n
+context.OpenAMLogout(logout_url, REQUEST.getCookie(token_id))\n
+\n
+site_root = context.getWebSiteValue()\n
+if site_root is None:\n
+  site_root = portal\n
+\n
+return REQUEST.RESPONSE.redirect(site_rool.absolute_url())\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>_proxy_roles</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>REQUEST</string>
+                            <string>portal</string>
+                            <string>getPreference</string>
+                            <string>logout_url</string>
+                            <string>token_id</string>
+                            <string>site_root</string>
+                            <string>None</string>
+                            <string>site_rool</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>logout</string> </value>
+        </item>
+        <item>
+            <key> <string>original_source</string> </key>
+            <value> <string>## Script (Python) "logout"\n
+##bind container=container\n
+##bind context=context\n
+##bind namespace=\n
+##bind script=script\n
+##bind subpath=traverse_subpath\n
+##parameters=\n
+##title=Logout handler\n
+##\n
+REQUEST = context.REQUEST\n
+if REQUEST.has_key(\'portal_skin\'):\n
+   context.portal_skins.clearSkinCookie()\n
+REQUEST.RESPONSE.expireCookie(\'__ac\', path=\'/\')\n
+return REQUEST.RESPONSE.redirect(REQUEST.URL1+\'/logged_out\')\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Logout handler</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_sso_openam/bt/change_log b/bt5/erp5_sso_openam/bt/change_log
new file mode 100644
index 0000000000..3eb10bbba7
--- /dev/null
+++ b/bt5/erp5_sso_openam/bt/change_log
@@ -0,0 +1,2 @@
+2010-11-22 Kazuhiko
+* initial import.
\ No newline at end of file
diff --git a/bt5/erp5_sso_openam/bt/copyright_list b/bt5/erp5_sso_openam/bt/copyright_list
new file mode 100644
index 0000000000..54e8ef4cf8
--- /dev/null
+++ b/bt5/erp5_sso_openam/bt/copyright_list
@@ -0,0 +1 @@
+2010 © Nexedi SA
\ No newline at end of file
diff --git a/bt5/erp5_sso_openam/bt/description b/bt5/erp5_sso_openam/bt/description
new file mode 100644
index 0000000000..84dc4807cb
--- /dev/null
+++ b/bt5/erp5_sso_openam/bt/description
@@ -0,0 +1 @@
+This business template is for SSO with OpenAM.
\ No newline at end of file
diff --git a/bt5/erp5_sso_openam/bt/license b/bt5/erp5_sso_openam/bt/license
new file mode 100644
index 0000000000..3a3e12bcad
--- /dev/null
+++ b/bt5/erp5_sso_openam/bt/license
@@ -0,0 +1 @@
+GPL
\ No newline at end of file
diff --git a/bt5/erp5_sso_openam/bt/maintainer_list b/bt5/erp5_sso_openam/bt/maintainer_list
new file mode 100644
index 0000000000..91fac13497
--- /dev/null
+++ b/bt5/erp5_sso_openam/bt/maintainer_list
@@ -0,0 +1 @@
+kazuhiko
\ No newline at end of file
diff --git a/bt5/erp5_sso_openam/bt/revision b/bt5/erp5_sso_openam/bt/revision
new file mode 100644
index 0000000000..56a6051ca2
--- /dev/null
+++ b/bt5/erp5_sso_openam/bt/revision
@@ -0,0 +1 @@
+1
\ No newline at end of file
diff --git a/bt5/erp5_sso_openam/bt/template_action_path_list b/bt5/erp5_sso_openam/bt/template_action_path_list
new file mode 100644
index 0000000000..fe4c6710aa
--- /dev/null
+++ b/bt5/erp5_sso_openam/bt/template_action_path_list
@@ -0,0 +1 @@
+System Preference | openam_preference
\ No newline at end of file
diff --git a/bt5/erp5_sso_openam/bt/template_extension_id_list b/bt5/erp5_sso_openam/bt/template_extension_id_list
new file mode 100644
index 0000000000..2b56f2baf0
--- /dev/null
+++ b/bt5/erp5_sso_openam/bt/template_extension_id_list
@@ -0,0 +1 @@
+OpenAMLogout
\ No newline at end of file
diff --git a/bt5/erp5_sso_openam/bt/template_format_version b/bt5/erp5_sso_openam/bt/template_format_version
new file mode 100644
index 0000000000..56a6051ca2
--- /dev/null
+++ b/bt5/erp5_sso_openam/bt/template_format_version
@@ -0,0 +1 @@
+1
\ No newline at end of file
diff --git a/bt5/erp5_sso_openam/bt/template_skin_id_list b/bt5/erp5_sso_openam/bt/template_skin_id_list
new file mode 100644
index 0000000000..a547d72111
--- /dev/null
+++ b/bt5/erp5_sso_openam/bt/template_skin_id_list
@@ -0,0 +1 @@
+erp5_sso_openam
\ No newline at end of file
diff --git a/bt5/erp5_sso_openam/bt/title b/bt5/erp5_sso_openam/bt/title
new file mode 100644
index 0000000000..a547d72111
--- /dev/null
+++ b/bt5/erp5_sso_openam/bt/title
@@ -0,0 +1 @@
+erp5_sso_openam
\ No newline at end of file
diff --git a/bt5/erp5_sso_openam/bt/version b/bt5/erp5_sso_openam/bt/version
new file mode 100644
index 0000000000..48360de846
--- /dev/null
+++ b/bt5/erp5_sso_openam/bt/version
@@ -0,0 +1 @@
+5.4.7
\ No newline at end of file
-- 
2.30.9