From b1904c7f78abed1faf32ed6acb94aefb350f7aa8 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 20 Oct 2010 23:58:03 -0600 Subject: [PATCH] ACL management page tweaks --- imp/lib/Prefs/Ui.php | 12 +++++++++++- imp/templates/prefs/acl.html | 25 ++++--------------------- imp/themes/screen.css | 5 +++++ 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/imp/lib/Prefs/Ui.php b/imp/lib/Prefs/Ui.php index 9ef43aff7..1ee767d41 100644 --- a/imp/lib/Prefs/Ui.php +++ b/imp/lib/Prefs/Ui.php @@ -705,13 +705,23 @@ class IMP_Prefs_Ui } $canEdit = $acl->canEdit($folder, $GLOBALS['registry']->getAuth()); + $canEdit = false; + + if (!$canEdit) { + $GLOBALS['notification']->push(_("You do not have permission to change access to this folder."), 'horde.warning'); + } + + if (!count($curr_acl)) { + $GLOBALS['notification']->push(_("The current list of users with access to this folder could not be retrieved."), 'horde.warning'); + } + $t = $GLOBALS['injector']->createInstance('Horde_Template'); $t->setOption('gettext', true); $t->set('options', IMP::flistSelect(array('selected' => $folder))); $t->set('current', sprintf(_("Current access to %s"), IMP::displayFolder($folder))); $t->set('folder', IMP::formMbox($folder, true)); - $t->set('noacl', !count($curr_acl)); + $t->set('hasacl', count($curr_acl)); $t->set('maxrule', 1); if (!$t->get('noacl')) { diff --git a/imp/templates/prefs/acl.html b/imp/templates/prefs/acl.html index b7d47867e..5e6bb30da 100644 --- a/imp/templates/prefs/acl.html +++ b/imp/templates/prefs/acl.html @@ -4,15 +4,8 @@

- - - - - - - +
- The current list of users with access to this folder could not be retrieved. -
+ - - - - - - - - - - + +

User

@@ -56,18 +49,8 @@
- You do not have permission to change access to this folder. -
diff --git a/imp/themes/screen.css b/imp/themes/screen.css index 0d2269f61..35e9eadf6 100644 --- a/imp/themes/screen.css +++ b/imp/themes/screen.css @@ -458,6 +458,11 @@ table.searchesmanagement .vfolderenabled { padding: 5px 10px; } +.prefsAclTable { + padding-bottom: 8px; + width: 100%; +} + /* Quota styles. */ .quotawarn { color: #000; -- 2.11.0