summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2014-10-11 01:28:17 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2014-10-11 01:28:17 (GMT)
commite618f0093c4a32039f3b2399c945e974822cb7f6 (patch)
treea1f94b32809f0d9f779bebe9274144f5d119dfed /plugins
parent8d13292b3833a4bff27865377fae75ae8905d015 (diff)
downloadroundcubemail-plugins-kolab-e618f0093c4a32039f3b2399c945e974822cb7f6.tar.gz
Support wildcard option to allow full access
Diffstat (limited to 'plugins')
-rw-r--r--plugins/kolab_auth/config.inc.php.dist2
-rw-r--r--plugins/kolab_auth/kolab_auth.php6
2 files changed, 6 insertions, 2 deletions
diff --git a/plugins/kolab_auth/config.inc.php.dist b/plugins/kolab_auth/config.inc.php.dist
index b353d61..77cbe4a 100644
--- a/plugins/kolab_auth/config.inc.php.dist
+++ b/plugins/kolab_auth/config.inc.php.dist
@@ -53,6 +53,8 @@ $config['kolab_auth_admin_rights'] = array(
'settings' => 'entry:read',
'mail' => 'entry:delete',
'addressbook' => 'entry:delete',
+ // or use a wildcard entry like this:
+ '*' => 'entry:read',
);
// Enable plugins on a role-by-role basis. In this example, the 'acl' plugin
diff --git a/plugins/kolab_auth/kolab_auth.php b/plugins/kolab_auth/kolab_auth.php
index 31f50ad..fa70ee9 100644
--- a/plugins/kolab_auth/kolab_auth.php
+++ b/plugins/kolab_auth/kolab_auth.php
@@ -96,13 +96,15 @@ class kolab_auth extends rcube_plugin
// redirect to the first task on the list
if (!empty($_SESSION['kolab_auth_allowed_tasks'])) {
$tasks = (array)$_SESSION['kolab_auth_allowed_tasks'];
- if (!in_array($args['task'], $tasks)) {
+ if (!in_array($args['task'], $tasks) && !in_array('*', $tasks)) {
header('Location: ?_task=' . array_shift($tasks));
die;
}
// add script that will remove disabled taskbar buttons
- $this->add_hook('render_page', array($this, 'render_page'));
+ if (!in_array('*', $tasks)) {
+ $this->add_hook('render_page', array($this, 'render_page'));
+ }
}
}