From 6b0aaf0246842c6a6f2591ee8961f715592f0d31 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 19 Jan 2016 18:22:09 +0100 Subject: [PATCH] [jan] Allow to edit permissions of another user's rules if that user assigned ownership. --- docs/CHANGES | 2 ++ lib/Application.php | 11 ++++++++--- package.xml | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/CHANGES b/docs/CHANGES index 090cbb1e..804e4d91 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -2,6 +2,8 @@ v3.2.8-git ---------- +[jan] Allow to edit permissions of another user's rules if that user assigned + ownership. [jan] Use access rules compatible with both Apache 2.2 and 2.4. [jan] Fix variable name in vacation_addresses hook example. [jan] Correctly save names of mailbox created from the rule form (Bug #14150). diff --git a/lib/Application.php b/lib/Application.php index 931a96a5..83fdb516 100644 --- a/lib/Application.php +++ b/lib/Application.php @@ -143,8 +143,14 @@ public function menu($menu) $menu->add(Ingo_Basic_Script::url(), _("_Script"), 'ingo-script', null, null, null, $vars->page == 'script' ? 'current' : '__noselection'); } - if ($injector->getInstance('Ingo_Shares') && + if (($shares = $injector->getInstance('Ingo_Shares')) && empty($conf['share']['no_sharing'])) { + if ($shares->getShare($session->get('ingo', 'current_share'))->get('owner') == $registry->getAuth()) { + $share = $session->get('ingo', 'current_share'); + } else { + $share = $session->get('ingo', 'backend/id') + . ':' . $registry->getAuth(); + } $menu->add( '#', _("_Permissions"), @@ -160,8 +166,7 @@ public function menu($menu) array( 'params' => array( 'app' => 'ingo', - 'share' => $session->get('ingo', 'backend/id') - . ':' . $registry->getAuth() + 'share' => $share ), 'urlencode' => true ) diff --git a/package.xml b/package.xml index 76d14cff..742b94f7 100644 --- a/package.xml +++ b/package.xml @@ -33,6 +33,7 @@ ASL +* [jan] Allow to edit permissions of another user's rules if that user assigned ownership. * [jan] Use access rules compatible with both Apache 2.2 and 2.4. * [jan] Fix variable name in vacation_addresses hook example. * [jan] Correctly save names of mailbox created from the rule form (Bug #14150). @@ -1614,6 +1615,7 @@ 2016-01-13 ASL +* [jan] Allow to edit permissions of another user's rules if that user assigned ownership. * [jan] Use access rules compatible with both Apache 2.2 and 2.4. * [jan] Fix variable name in vacation_addresses hook example. * [jan] Correctly save names of mailbox created from the rule form (Bug #14150).