Eric Lippmann
7cef06f981
Disable benchmark only if the layout is disabled
...
Benchmark should be disabled if the response is not HTML. This is most likely the case when the layout is disabled.
If Web 2 or Zend sends JSON for example, the layout is disabled.
The follwing code inside an action disables the layout (and view):
$this->_helper->layout()->disableLayout();
The following code inside an action disables the action's view script:
$this->_helper->viewRenderer->setNoRender(true);
Note that an action's view script is also disabled via setNoRender() when rendering another view script via
render() or renderScript().
Another appraoch is to check the content-type. If explicitly set to not HTML, disable benchmark:
$renderBenchmark = true;
$response = $this->getResponse();
$headers = $response->getHeaders();
foreach ($headers as $header) {
if (strtolower($header['name']) === 'content-type'
&& stristr($header['value'], 'text/html') === false
) {
$renderBenchmark = false;
break;
}
}
if ($renderBenchmark) {
$layout->benchmark = $this->renderBenchmark();
}
Maybe we should also provide a action method for disabling benchmark, regardless of the user's setting.
refs #10856
2016-02-27 20:14:02 +01:00
Alexander A. Klimov
474803fee4
Change all license headers to only reflect a file's year of creation
...
refs #11000
2016-02-08 15:41:00 +01:00
Eric Lippmann
7fd575080e
PHP7: Rename String to StringHelper
...
refs #10251
2016-01-27 16:46:55 +01:00
Eric Lippmann
0cc54ce34b
Refresh session every 10 minutes
...
Quick and dirty fix.
fixes #10229
2015-11-16 14:19:33 +01:00
Johannes Meyer
53f29131af
ActionController: Use a controller's inner layout script instead of "body"
...
"body" is still the default inner layout script.
2015-10-02 10:18:37 +02:00
Eric Lippmann
0f8c28d749
Merge branch 'master' into feature/api-9606
2015-09-07 11:33:44 +02:00
Eric Lippmann
4fb6856caf
Fix exception when navigating to the preferences after namespacing all controllers
2015-08-31 10:19:30 +02:00
Eric Lippmann
e7e1b1a98e
Dispatcher: Default to the default module if no module has been given in the request
...
This is most likely the case when custom routes have been added to the router w/o the module parameter being set.
refs #5786
2015-08-28 13:13:20 +02:00
Eric Lippmann
4070f6c75b
Merge branch 'master' into feature/namespaced-controllers-5786
2015-08-27 15:05:44 +02:00
Eric Lippmann
28009eb563
Rename controller namespace to Controllers
...
refs #5786
2015-08-27 13:03:45 +02:00
Eric Lippmann
c5f444efe8
lib: Don't alias Zend classes in the ActionController
2015-08-20 16:10:39 +02:00
Eric Lippmann
6ca02a519b
lib: Fix type hint of Controller::getResponse()
2015-08-20 16:07:24 +02:00
Eric Lippmann
62f0281a62
lib: Fix type hint of Controller::getRequest()
2015-08-20 16:00:24 +02:00
Johannes Meyer
63e639caf0
Handle module identification directly in the ActionController
...
Fixes some issues with more complex customisations in a
module's controller.
Obsoletes: 93f8297344
2015-08-19 13:39:46 +02:00
Johannes Meyer
036da072c5
Revert "ActionController: Give modules a chance to dynamically require auth"
...
This reverts commit 93f8297344
.
2015-08-19 13:39:46 +02:00
Johannes Meyer
93f8297344
ActionController: Give modules a chance to dynamically require auth
2015-08-18 11:28:02 +02:00
Eric Lippmann
e31dce97a9
Fix dispatching namespaced module controllers
...
refs #5786
2015-08-18 11:11:28 +02:00
Eric Lippmann
7252f3237a
Introduce a constant for the controller namespace
...
refs #5786
2015-08-17 13:43:34 +02:00
Eric Lippmann
06e879f078
Throw an expcetion in our Dispatcher if the controller is not an instance of Zend_Controller_Action_Interface
...
refs #5786
2015-08-17 13:38:16 +02:00
Eric Lippmann
e26a7fd4d1
Use Zend_Cotroller_Dispatcher_Standard::getActionMethod() in the Dispatcher
...
refs #5786
2015-08-17 13:34:47 +02:00
Eric Lippmann
965fee1e9e
Fix 'void' method result used in the Dispatcher
...
refs #5786
2015-08-17 13:31:05 +02:00
Eric Lippmann
8b32edd6e9
Default to Zend's dispatcher if the controller name is empty
...
refs #5786
2015-08-17 13:29:47 +02:00
Eric Lippmann
e8c0e97bb3
Add PHPDoc to the Dispatcher
...
refs #5786
2015-08-17 13:10:01 +02:00
Eric Lippmann
f972a034e7
Fix license header in Dispatcher
...
refs #5786
2015-08-17 13:08:41 +02:00
Eric Lippmann
392eee5a1f
Merge branch 'master' into feature/namespaced-controllers-5786
...
Conflicts:
library/Icinga/Application/Web.php
2015-08-17 12:59:44 +02:00
Johannes Meyer
fa1e3a763d
Do not show the full layout on the login page
...
...
refs #9892
2015-08-13 08:12:30 +02:00
Eric Lippmann
a234852f32
Merge branch 'feature/basic-auth-9660'
...
resolves #9660
2015-07-30 15:05:07 +02:00
Eric Lippmann
81aad9d6a6
Rename Notifiation::getMessages() to popMessages()
...
Because the call to popMessages()--before getMessages()--automatically resets the notification messages on the instance, popMessages() is a much better name for the method.
refs #9660
2015-07-30 13:45:39 +02:00
Eric Lippmann
9f0e48a0a1
Don't send the X-Icinga-Module header more than once
...
fixes #9349
2015-07-30 09:28:05 +02:00
Eric Lippmann
07849e0fea
lib: Rename Authentication/Manager to Authentication/Auth
...
refs #9660
2015-07-28 17:08:55 +02:00
Eric Lippmann
7cfc78558d
Merge branch 'master' into feature/secure-modules-9644
...
Conflicts:
library/Icinga/Exception/IcingaException.php
2015-07-28 13:42:02 +02:00
Eric Lippmann
8358e9165c
Don't require the module permission for the default module
...
refs #9644
2015-07-24 15:11:21 +02:00
Eric Lippmann
b4f4ce4406
Require the module's permission for every module automatically
...
Module permissions are not required if authentication is disabled on the controller.
refs #9644
2015-07-23 12:51:10 +02:00
Eric Lippmann
b000ae3a37
Do not require permissions if authentication is not required
...
refs #9644
2015-07-23 12:50:02 +02:00
Eric Lippmann
aa567f8cd7
Introduce ModuleActionController::$requiresModulePermission
...
refs #9644
2015-07-22 14:56:02 +02:00
Eric Lippmann
13d954a956
Fix rawurlencode call
2015-07-22 13:36:25 +02:00
Eric Lippmann
52e352751e
Revert "ModuleActionController: fix forward/X-Icinga-Module"
...
This reverts commit bf82bd4ce1
.
We have a not merged branch for this.
refs #9349
2015-07-22 13:34:44 +02:00
Markus Frosch
ab8e775188
Fix duplicate headers on forward() inside a controller
...
This avoids that the JS loader flattening arrays.
refs #9349
2015-07-22 13:34:44 +02:00
Johannes Meyer
54a77b7253
Merge branch 'master' into feature/support-for-file-uploads-8758
2015-07-22 13:30:56 +02:00
Thomas Gelf
bf82bd4ce1
ModuleActionController: fix forward/X-Icinga-Module
2015-07-22 10:53:42 +02:00
Johannes Meyer
d192410435
Introduce GET parameter _disableLayout to ... disable the entire layout
...
refs #8758
2015-07-16 11:23:48 +02:00
Johannes Meyer
2e375dd57c
Do not bypass the view renderer when rendering benchmarks
...
fixes #9402
2015-06-22 13:56:41 +02:00
Johannes Meyer
d36f90d8cb
Navigation: Restructure authentication backend configuration
...
This moves the configuration tabs for user and group backends into
a dedicated menu entry called "Authentication". All tabs previously
available in this menu entry were moved into their own dedicated
menu entry as well to not to confuse users.
fixes #9398
2015-06-22 13:26:24 +02:00
Thomas Gelf
1f5db2f8c1
ActionController: introduce showCompact
...
Works like view=compact, it will allow us to "free" the "view" parameter
2015-06-18 13:41:12 +02:00
Thomas Gelf
2f62a4383a
Layout: add showFullscreen parameter
...
refs #6729
2015-06-18 13:41:12 +02:00
Johannes Meyer
7213379cac
AuthBackendController: Add final indexAction
...
Required to automatically redirect to the first permitted list action.
refs #8826
2015-06-02 11:59:04 +02:00
Johannes Meyer
00c31ffd28
RolesController: Rename to RoleController
2015-06-02 11:57:13 +02:00
Johannes Meyer
cf96e66ff2
Rename permission config/application/roles* to config/authentication/...
...
Does also split it into *, show, add, edit, remove as this should behave like
any other authentication configuration.
refs #8826
2015-06-02 09:07:06 +02:00
Johannes Meyer
3fffd90135
Rename permission config/application/groups* to config/authentication/...
...
refs #8826
2015-06-02 09:04:34 +02:00
Johannes Meyer
a558f2873a
Rename permission config/application/users* to config/authentication/...
...
refs #8826
2015-06-02 09:02:57 +02:00