summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-08-04 19:03:27 +0200
committerAleksander Machniak <alec@alec.pl>2014-08-04 19:03:27 +0200
commitd01f9fc7f5a369284fbfd92c6e804d84147e42a1 (patch)
tree0b789da2e28bc8405a095b47ac0afe45f9a9babd /index.php
parent04638fb7e5d86f6768a5318008a604818685448f (diff)
Add option (disabled_actions) to disable UI elements/actions (#1489638)
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/index.php b/index.php
index e0aaf77f8..3154daf68 100644
--- a/index.php
+++ b/index.php
@@ -260,6 +260,14 @@ else {
'message' => "Referer check failed"), true, true);
}
}
+
+ // check access to disabled actions
+ $disabled_actions = (array) $RCMAIL->config->get('disabled_actions');
+ if (in_array($RCMAIL->task . '.' . ($RCMAIL->action ?: 'index'), $disabled_actions)) {
+ rcube::raise_error(array(
+ 'code' => 403, 'type' => 'php',
+ 'message' => "Action disabled"), true, true);
+ }
}
// we're ready, user is authenticated and the request is safe