From ac759b4703e6dc92c7aa10e7decf3db83ed630ee Mon Sep 17 00:00:00 2001 From: Sascha Wilde Date: Wed, 22 Apr 2009 18:00:46 +0200 Subject: Added Gunnar's patch for kolab/issue3455^Jconvenient ACL handling in dimp. --- kolab-webclient/kolab-webclient.spec | 2 +- .../1.2.0/horde-webmail-1.2.0_kolab_openpkg.patch | 143 +++++++++++++++++++++ patches/horde-webmail/1.2.0/merges/series | 1 + .../1.2.0/merges/t_dimp_H_GW_AclView.diff | 143 +++++++++++++++++++++ 4 files changed, 288 insertions(+), 1 deletion(-) create mode 100644 patches/horde-webmail/1.2.0/merges/t_dimp_H_GW_AclView.diff diff --git a/kolab-webclient/kolab-webclient.spec b/kolab-webclient/kolab-webclient.spec index 1bfea53..5726000 100644 --- a/kolab-webclient/kolab-webclient.spec +++ b/kolab-webclient/kolab-webclient.spec @@ -8,7 +8,7 @@ %define V_source_version 1.2 %define V_passwd_version 3.0.1 %define V_date %{V_year}-%{V_month}-%{V_day} -%define V_release %{V_year}%{V_month}%{V_day}suc01 +%define V_release %{V_year}%{V_month}%{V_day}suc02 # Package Information Name: %{V_package} diff --git a/patches/horde-webmail/1.2.0/horde-webmail-1.2.0_kolab_openpkg.patch b/patches/horde-webmail/1.2.0/horde-webmail-1.2.0_kolab_openpkg.patch index cb6fe48..7509758 100644 --- a/patches/horde-webmail/1.2.0/horde-webmail-1.2.0_kolab_openpkg.patch +++ b/patches/horde-webmail/1.2.0/horde-webmail-1.2.0_kolab_openpkg.patch @@ -20071,3 +20071,146 @@ index 3227519..48769a2 100644 } } +From: Gunnar Wrobel +Subject: [PATCH] t/dimp/H/GW/AclView + +Provide a possibility to edit IMAP folder acls within DIMP. + +kolab/issue3455 (There is no convenient/dimp-like way in dimp to set folder acls) +https://www.intevation.de/roundup/kolab/issue3455 + +[#8060] Additional entry in the folder popup to set IMAP ACLs +http://bugs.horde.org/ticket/8060 + +Signed-off-by: Gunnar Wrobel + +--- + horde-webmail/dimp/js/DimpBase.js | 1 + + horde-webmail/dimp/lib/DIMP.php | 1 + + horde-webmail/dimp/templates/index/index.inc | 1 + + horde-webmail/imp/acl.php | 12 ++++++++++-- + horde-webmail/imp/templates/acl/acl.html | 6 ++++++ + 5 files changed, 19 insertions(+), 2 deletions(-) + +diff --git a/horde-webmail/dimp/js/DimpBase.js b/horde-webmail/dimp/js/DimpBase.js +index 39a728b..c4eb9f4 100644 +--- a/horde-webmail/dimp/js/DimpBase.js ++++ b/horde-webmail/dimp/js/DimpBase.js +@@ -1941,6 +1941,7 @@ var DimpBase = { + C({ d: $('ctx_folder_rename'), f: function() { this.renameFolder(DimpCore.DMenu.element()); }.bind(this), ns: true }); + C({ d: $('ctx_folder_empty'), f: function() { if (window.confirm(DIMP.text.empty_folder)) { DimpCore.doAction('EmptyFolder', { folder: DimpCore.DMenu.element().readAttribute('mbox') }, [], this._emptyFolderCallback.bind(this)); } }.bind(this), ns: true }); + C({ d: $('ctx_folder_delete'), f: function() { if (window.confirm(DIMP.text.delete_folder)) { DimpCore.doAction('DeleteFolder', { folder: DimpCore.DMenu.element().readAttribute('mbox') }, [], this.bcache.get('folderC') || this.bcache.set('folderC', this._folderCallback.bind(this))); } }.bind(this), ns: true }); ++ C({ d: $('ctx_folder_rights'), f: function() { this.go('app:horde', DIMP.conf.folder_rights + '&' + $H({ folder: DimpCore.DMenu.element().readAttribute('mbox') }).toQueryString() ) }.bind(this), ns: true }); + [ 'ctx_folder_seen', 'ctx_folder_unseen' ].each(function(a) { + C({ d: $(a), f: function(type) { this.flag(type, null, DimpCore.DMenu.element().readAttribute('mbox')); }.bind(this, a == 'ctx_folder_seen' ? 'allSeen' : 'allUnseen'), ns: true }); + }, this); +diff --git a/horde-webmail/dimp/lib/DIMP.php b/horde-webmail/dimp/lib/DIMP.php +index 0aa3b78..92a1e55 100644 +--- a/horde-webmail/dimp/lib/DIMP.php ++++ b/horde-webmail/dimp/lib/DIMP.php +@@ -145,6 +145,7 @@ class DIMP { + 'message_url' => Horde::url($dimp_webroot . '/message.php'), + 'compose_url' => Horde::url($dimp_webroot . '/compose.php'), + 'prefs_url' => str_replace('&', '&', Horde::getServiceLink('options', 'dimp')), ++ 'folder_rights' => Util::addParameter(Horde::url($registry->get('webroot', 'imp') . '/acl.php', true), array('app' => 'imp', 'group'=> 'acl'), null, false), + + 'sortthread' => SORTTHREAD, + 'sortdate' => SORTDATE, +diff --git a/horde-webmail/dimp/templates/index/index.inc b/horde-webmail/dimp/templates/index/index.inc +index 21939e0..7c02fe7 100644 +--- a/horde-webmail/dimp/templates/index/index.inc ++++ b/horde-webmail/dimp/templates/index/index.inc +@@ -323,6 +323,7 @@ function _createDA($text, $image, $id = null, $class = '', $show_text = true) + + + ++ +
+ + +diff --git a/horde-webmail/imp/acl.php b/horde-webmail/imp/acl.php +index cfa285f..851d8de 100644 +--- a/horde-webmail/imp/acl.php ++++ b/horde-webmail/imp/acl.php +@@ -162,14 +162,22 @@ if (is_callable(array('Horde', 'loadConfiguration'))) { + } + $app = 'imp'; + $chunk = Util::nonInputVar('chunk'); +-Prefs_UI::generateHeader(null, $chunk); ++if ($_SESSION['imp']['default_view'] != 'dimp') { ++ Prefs_UI::generateHeader(null, $chunk); ++} else { ++ require $registry->get('templates', $app) . '/common-header.inc'; ++ $GLOBALS['notification']->notify(array('listeners' => 'status')); ++} + + /* Set up template. */ + $t = new IMP_Template(); + $t->setOption('gettext', true); + $t->set('aclurl', Horde::applicationUrl('acl.php')); + $t->set('forminput', Util::formInput()); +-$t->set('aclnavcell', Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'acl')); ++$t->set('imp_view', $_SESSION['imp']['default_view'] != 'dimp'); ++if ($_SESSION['imp']['default_view'] != 'dimp') { ++ $t->set('aclnavcell', Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'acl')); ++} + $t->set('changefolder', Horde::link('#', _("Change Folder"), 'smallheader', '', 'ACLFolderChange(true); return false;')); + $t->set('sharedimg', Horde::img('shared.png', _("Change Folder"))); + $t->set('options', IMP::flistSelect('', true, array(), $folder)); +diff --git a/horde-webmail/imp/templates/acl/acl.html b/horde-webmail/imp/templates/acl/acl.html +index 79580aa..72cf1c5 100644 +--- a/horde-webmail/imp/templates/acl/acl.html ++++ b/horde-webmail/imp/templates/acl/acl.html +@@ -7,6 +7,7 @@ + Share mail folders + + ++ +
+
    +
  • +@@ -17,6 +18,7 @@ + +
+ ++
+ +
+ +@@ -76,9 +78,13 @@ + + + ++ + + + ++ ++ ++ + +   + +-- +tg: (3c3721f..) t/dimp/H/GW/AclView (depends on: t/dimp/H/GW/FoldersView) +-- +TOPGIT patch commit log +======================= + +commit cac1482cec6c96a8a1d7fb7c0e8c2433877728f5 +Author: Gunnar Wrobel +Date: Fri Mar 13 12:04:03 2009 +0000 + + Complete the patch description. + +commit 7a349ad9da06264378e84e54d7424f5dc78a9154 +Author: Gunnar Wrobel +Date: Fri Mar 13 12:00:43 2009 +0000 + + Reduce the functionality of the ACL view when calling from DIMP. In addition add the call to the acl settings page within the folder context menu. + +commit 2fdc4d0fcd6e4956129f6ec11501112568b99c6d +Author: Gunnar Wrobel +Date: Sun Mar 8 19:59:30 2009 +0000 + + Completed a draft. diff --git a/patches/horde-webmail/1.2.0/merges/series b/patches/horde-webmail/1.2.0/merges/series index 418a8ed..9fd814a 100644 --- a/patches/horde-webmail/1.2.0/merges/series +++ b/patches/horde-webmail/1.2.0/merges/series @@ -1,2 +1,3 @@ t_framework_HK_SW_Kolab__Storage_DovecotSharedFolderOwner.diff issue3329.patch +t_dimp_H_GW_AclView.diff diff --git a/patches/horde-webmail/1.2.0/merges/t_dimp_H_GW_AclView.diff b/patches/horde-webmail/1.2.0/merges/t_dimp_H_GW_AclView.diff new file mode 100644 index 0000000..8870b17 --- /dev/null +++ b/patches/horde-webmail/1.2.0/merges/t_dimp_H_GW_AclView.diff @@ -0,0 +1,143 @@ +From: Gunnar Wrobel +Subject: [PATCH] t/dimp/H/GW/AclView + +Provide a possibility to edit IMAP folder acls within DIMP. + +kolab/issue3455 (There is no convenient/dimp-like way in dimp to set folder acls) +https://www.intevation.de/roundup/kolab/issue3455 + +[#8060] Additional entry in the folder popup to set IMAP ACLs +http://bugs.horde.org/ticket/8060 + +Signed-off-by: Gunnar Wrobel + +--- + horde-webmail/dimp/js/DimpBase.js | 1 + + horde-webmail/dimp/lib/DIMP.php | 1 + + horde-webmail/dimp/templates/index/index.inc | 1 + + horde-webmail/imp/acl.php | 12 ++++++++++-- + horde-webmail/imp/templates/acl/acl.html | 6 ++++++ + 5 files changed, 19 insertions(+), 2 deletions(-) + +diff --git a/horde-webmail/dimp/js/DimpBase.js b/horde-webmail/dimp/js/DimpBase.js +index 39a728b..c4eb9f4 100644 +--- a/horde-webmail/dimp/js/DimpBase.js ++++ b/horde-webmail/dimp/js/DimpBase.js +@@ -1941,6 +1941,7 @@ var DimpBase = { + C({ d: $('ctx_folder_rename'), f: function() { this.renameFolder(DimpCore.DMenu.element()); }.bind(this), ns: true }); + C({ d: $('ctx_folder_empty'), f: function() { if (window.confirm(DIMP.text.empty_folder)) { DimpCore.doAction('EmptyFolder', { folder: DimpCore.DMenu.element().readAttribute('mbox') }, [], this._emptyFolderCallback.bind(this)); } }.bind(this), ns: true }); + C({ d: $('ctx_folder_delete'), f: function() { if (window.confirm(DIMP.text.delete_folder)) { DimpCore.doAction('DeleteFolder', { folder: DimpCore.DMenu.element().readAttribute('mbox') }, [], this.bcache.get('folderC') || this.bcache.set('folderC', this._folderCallback.bind(this))); } }.bind(this), ns: true }); ++ C({ d: $('ctx_folder_rights'), f: function() { this.go('app:horde', DIMP.conf.folder_rights + '&' + $H({ folder: DimpCore.DMenu.element().readAttribute('mbox') }).toQueryString() ) }.bind(this), ns: true }); + [ 'ctx_folder_seen', 'ctx_folder_unseen' ].each(function(a) { + C({ d: $(a), f: function(type) { this.flag(type, null, DimpCore.DMenu.element().readAttribute('mbox')); }.bind(this, a == 'ctx_folder_seen' ? 'allSeen' : 'allUnseen'), ns: true }); + }, this); +diff --git a/horde-webmail/dimp/lib/DIMP.php b/horde-webmail/dimp/lib/DIMP.php +index 0aa3b78..92a1e55 100644 +--- a/horde-webmail/dimp/lib/DIMP.php ++++ b/horde-webmail/dimp/lib/DIMP.php +@@ -145,6 +145,7 @@ class DIMP { + 'message_url' => Horde::url($dimp_webroot . '/message.php'), + 'compose_url' => Horde::url($dimp_webroot . '/compose.php'), + 'prefs_url' => str_replace('&', '&', Horde::getServiceLink('options', 'dimp')), ++ 'folder_rights' => Util::addParameter(Horde::url($registry->get('webroot', 'imp') . '/acl.php', true), array('app' => 'imp', 'group'=> 'acl'), null, false), + + 'sortthread' => SORTTHREAD, + 'sortdate' => SORTDATE, +diff --git a/horde-webmail/dimp/templates/index/index.inc b/horde-webmail/dimp/templates/index/index.inc +index 21939e0..7c02fe7 100644 +--- a/horde-webmail/dimp/templates/index/index.inc ++++ b/horde-webmail/dimp/templates/index/index.inc +@@ -323,6 +323,7 @@ function _createDA($text, $image, $id = null, $class = '', $show_text = true) + + + ++ +
+ + +diff --git a/horde-webmail/imp/acl.php b/horde-webmail/imp/acl.php +index cfa285f..851d8de 100644 +--- a/horde-webmail/imp/acl.php ++++ b/horde-webmail/imp/acl.php +@@ -162,14 +162,22 @@ if (is_callable(array('Horde', 'loadConfiguration'))) { + } + $app = 'imp'; + $chunk = Util::nonInputVar('chunk'); +-Prefs_UI::generateHeader(null, $chunk); ++if ($_SESSION['imp']['default_view'] != 'dimp') { ++ Prefs_UI::generateHeader(null, $chunk); ++} else { ++ require $registry->get('templates', $app) . '/common-header.inc'; ++ $GLOBALS['notification']->notify(array('listeners' => 'status')); ++} + + /* Set up template. */ + $t = new IMP_Template(); + $t->setOption('gettext', true); + $t->set('aclurl', Horde::applicationUrl('acl.php')); + $t->set('forminput', Util::formInput()); +-$t->set('aclnavcell', Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'acl')); ++$t->set('imp_view', $_SESSION['imp']['default_view'] != 'dimp'); ++if ($_SESSION['imp']['default_view'] != 'dimp') { ++ $t->set('aclnavcell', Util::bufferOutput(array('Prefs_UI', 'generateNavigationCell'), 'acl')); ++} + $t->set('changefolder', Horde::link('#', _("Change Folder"), 'smallheader', '', 'ACLFolderChange(true); return false;')); + $t->set('sharedimg', Horde::img('shared.png', _("Change Folder"))); + $t->set('options', IMP::flistSelect('', true, array(), $folder)); +diff --git a/horde-webmail/imp/templates/acl/acl.html b/horde-webmail/imp/templates/acl/acl.html +index 79580aa..72cf1c5 100644 +--- a/horde-webmail/imp/templates/acl/acl.html ++++ b/horde-webmail/imp/templates/acl/acl.html +@@ -7,6 +7,7 @@ + Share mail folders + + ++ +
+
    +
  • +@@ -17,6 +18,7 @@ + +
+ ++
+ +
+ +@@ -76,9 +78,13 @@ + + + ++ + + + ++ ++ ++ + +   + +-- +tg: (3c3721f..) t/dimp/H/GW/AclView (depends on: t/dimp/H/GW/FoldersView) +-- +TOPGIT patch commit log +======================= + +commit cac1482cec6c96a8a1d7fb7c0e8c2433877728f5 +Author: Gunnar Wrobel +Date: Fri Mar 13 12:04:03 2009 +0000 + + Complete the patch description. + +commit 7a349ad9da06264378e84e54d7424f5dc78a9154 +Author: Gunnar Wrobel +Date: Fri Mar 13 12:00:43 2009 +0000 + + Reduce the functionality of the ACL view when calling from DIMP. In addition add the call to the acl settings page within the folder context menu. + +commit 2fdc4d0fcd6e4956129f6ec11501112568b99c6d +Author: Gunnar Wrobel +Date: Sun Mar 8 19:59:30 2009 +0000 + + Completed a draft. -- cgit v0.12