diff --git a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_getAdvancedSearchResults.xml b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_getAdvancedSearchResults.xml
index eeec757a3734442e80d7743c2e9bc0e85b541129..e3c52423a670803d24164409780e0d725ae51e90 100644
--- a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_getAdvancedSearchResults.xml
+++ b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_getAdvancedSearchResults.xml
@@ -79,9 +79,14 @@ for k,v in args.items():\n
     cats.append(\'/\'.join((k,v)))\n
 if cats!=[]:\n
   args[\'category\']=cats\n
-context.log(\'args\',args)\n
 kw.update(args)\n
 \n
+# a hack because SQLCatalog wants table.key now \n
+# dunno if it is a bug or a feature\n
+if kw.has_key(\'SearchableText\'):\n
+  kw[\'full_text.SearchableText\']=kw[\'SearchableText\']\n
+  kw.pop(\'SearchableText\')\n
+\n
 cf=kw.get(\'creation_from\')\n
 ct=kw.get(\'creation_to\')\n
 mf=kw.get(\'modification_from\')\n
@@ -98,8 +103,18 @@ if mt:\n
   wheres.append(\'modification_date<"\'+str(mt)+\'"\')\n
 if wheres!=[]:\n
   kw[\'where_expression\']=\' AND \'.join(wheres)\n
-context.log(\'wheres\',kw.get(\'where_expression\',\'x\'))\n
-return context.portal_catalog(**kw)\n
+\n
+res=context.portal_catalog(**kw)\n
+\n
+if kw.get(\'mine\')==1: # user wants only his documents\n
+  from AccessControl import getSecurityManager\n
+  sm=getSecurityManager()\n
+  u=sm.getUser()\n
+  # now we need to filter by owner\n
+  # some day we will do it in catalog\n
+  res=[r for r in res if u.allowed(r,(\'Owner\',))]\n
+\n
+return res\n
 
 
 ]]></string> </value>
@@ -154,6 +169,7 @@ return context.portal_catalog(**kw)\n
                             <string>_getiter_</string>
                             <string>k</string>
                             <string>v</string>
+                            <string>_getitem_</string>
                             <string>cf</string>
                             <string>ct</string>
                             <string>mf</string>
@@ -161,6 +177,14 @@ return context.portal_catalog(**kw)\n
                             <string>wheres</string>
                             <string>str</string>
                             <string>_apply_</string>
+                            <string>res</string>
+                            <string>AccessControl</string>
+                            <string>getSecurityManager</string>
+                            <string>sm</string>
+                            <string>u</string>
+                            <string>append</string>
+                            <string>$append0</string>
+                            <string>r</string>
                           </tuple>
                         </value>
                     </item>
diff --git a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_searchDialog.xml b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_searchDialog.xml
index 405e2adfb4fb060c0df5a26d3f77b408c1b9047e..e7fc22c301a48d74d611fe36f862c2d969b6dedd 100644
--- a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_searchDialog.xml
+++ b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_searchDialog.xml
@@ -76,6 +76,7 @@
                       <list>
                         <string>SearchableText</string>
                         <string>search_mode</string>
+                        <string>mine</string>
                       </list>
                     </value>
                 </item>
diff --git a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_searchDialog/mine.xml b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_searchDialog/mine.xml
new file mode 100644
index 0000000000000000000000000000000000000000..896b650f9ae2b9a2df43c05aad3f123b82d8071e
--- /dev/null
+++ b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/DMS_searchDialog/mine.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.Formulator.StandardFields</string>
+          <string>CheckBoxField</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>mine</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>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>Only my documents</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_dms/bt/id_generator b/bt5/erp5_dms/bt/id_generator
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/bt5/erp5_dms/bt/revision b/bt5/erp5_dms/bt/revision
index 1199cd493e5b0f7c20b1040406896a3f2004c700..c5a644422fb8f683632c43a9973c6f9bf3d5a12e 100644
--- a/bt5/erp5_dms/bt/revision
+++ b/bt5/erp5_dms/bt/revision
@@ -1 +1 @@
-219
\ No newline at end of file
+221
\ No newline at end of file
diff --git a/bt5/erp5_dms/bt/short_title b/bt5/erp5_dms/bt/short_title
new file mode 100644
index 0000000000000000000000000000000000000000..4af18322e32f3dd19579c80e26e4a306ad11e049
--- /dev/null
+++ b/bt5/erp5_dms/bt/short_title
@@ -0,0 +1 @@
+None
\ No newline at end of file