summaryrefslogtreecommitdiff
path: root/plugins/acl/acl.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/acl/acl.php')
-rw-r--r--plugins/acl/acl.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/plugins/acl/acl.php b/plugins/acl/acl.php
index 681ef0ee9..a8b8f58ad 100644
--- a/plugins/acl/acl.php
+++ b/plugins/acl/acl.php
@@ -111,6 +111,20 @@ class acl extends rcube_plugin
$users[] = $user;
}
}
+
+ if ($this->rc->config->get('acl_groups')) {
+ $prefix = $this->rc->config->get('acl_group_prefix');
+ $result = $this->ldap->list_groups($search, $mode);
+
+ foreach ($result as $record) {
+ $group = $record['name'];
+
+ if ($group) {
+ $users[] = array('name' => ($prefix ? $prefix : '') . $group, 'display' => $group);
+ $keys[] = $group;
+ }
+ }
+ }
}
sort($users, SORT_LOCALE_STRING);
@@ -439,9 +453,13 @@ class acl extends rcube_plugin
$result = 0;
foreach ($users as $user) {
- $user = trim($user);
+ $user = trim($user);
+ $prefix = $this->rc->config->get('acl_groups') ? $this->rc->config->get('acl_group_prefix') : '';
- if (!empty($this->specials) && in_array($user, $this->specials)) {
+ if ($prefix && strpos($user, $prefix) === 0) {
+ $username = $user;
+ }
+ else if (!empty($this->specials) && in_array($user, $this->specials)) {
$username = $this->gettext($user);
}
else if (!empty($user)) {