Commit Graph

817 Commits

Author SHA1 Message Date
Bas Couwenberg 075eb17005 Use continue <N> in case statements to fix ErrorException with PHP 7.3.
```
Fatal error: Uncaught ErrorException: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
```
2018-11-23 18:34:56 +01:00
Eric Lippmann 081b90e92f Raise version to 2.6.2 2018-11-20 12:39:21 +01:00
Eric Lippmann d919e23d0b
Merge pull request #3585 from Icinga/feature/enhanced-ldap-logging
Feature/enhanced ldap logging
2018-11-15 11:28:47 +01:00
Johannes Meyer 77bb1944db Web: Setup the logger earlier in the bootstrap process
Previously only ERROR got logged (to syslog only) up until
setupLogger() was called. This prevented any other message
level from being logged. It's now required to be able to
log in the Auth singleton. It also fixes the problem that
during setupSession() some warnings were never visible
due to the same reason.
2018-10-08 14:03:34 +02:00
Max Kozlov 65591c829f
Update Cli.php 2018-09-08 01:37:33 +03:00
Max Kozlov a55e32b1a1
Return non-zero on display usage
`Icingacli` should return non-zeno status code when display usage messages
 for example for invalid commands

https://github.com/Icinga/icinga2/issues/6585#issuecomment-418681789

It is good for automation and helps mitigate typing errors
2018-09-05 22:16:25 +03:00
Eric Lippmann 7e4b92b714 Fix permission test in Hook::has()
Before, only the first hook for the given type was tested. If this hook
belonged to a not permitted module, Hook::has() returned false. Though
there may have been other hooks which are permitted.
2018-08-16 17:03:42 +02:00
Eric Lippmann b3e0b5d587 Raise version to 2.6.1 2018-08-02 12:46:39 +02:00
Eric Lippmann 0f075b034b Respect permissions in Hook::has() 2018-07-26 11:51:23 +02:00
Johannes Meyer c0f99539ff Raise version to v2.6.0 2018-07-19 09:27:11 +02:00
Eric Lippmann dd9e8c8ba9 Revert "Merge pull request #3487 from Icinga/fix/web-bootstrap"
This reverts commit b12b905076, reversing
changes made to c633c86db7.

refs #3500
2018-07-18 15:29:55 +02:00
Eric Lippmann 121bd545d1
Merge pull request #3530 from Icinga/feature/enforce-a-named-identity-for-audit-logs
AuditHook: Enforce a named identity and allow to pass a explicit time
2018-07-18 15:27:45 +02:00
Johannes Meyer f28f7150fc AuditHook: Enforce a named identity and allow to pass a explicit time 2018-07-18 14:45:00 +02:00
Eric Lippmann 7d47875241 Introduce PdfexportHook 2018-07-18 14:22:18 +02:00
Eric Lippmann d18d05ccee Introduce ApplicationStateHook
refs #2835
2018-07-09 16:28:25 +02:00
Eric Lippmann 966148e8f0
Merge pull request #3463 from kobmaki/feature/Allow-to-interface-with-sqlite-databases-3381
Support SQLite resources
2018-06-28 11:42:00 +02:00
Eric Lippmann 0433dc4166 Bootstrap modules at last
We initialize modules before we set up the user backend and other
singletons. But modules may access those in order to check the
permissions of the authenticated user for example. With this fix,
modules are loaded once all other bootstrap tasks have been completed.

refs #3470
2018-06-27 09:52:00 +02:00
Uwe Ebel 4b5cf47cce Introduce SQLite resource type
refs #3381

Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
2018-06-27 09:40:22 +02:00
Alexander A. Klimov 1a94a21263 Prefer Json::encode() over json_encode()
refs #2635
2018-06-20 18:05:11 +02:00
Johannes Meyer 9da9f1237d Introduce class Icinga\Application\Hook\AuditHook
refs #2584
2018-06-08 14:21:15 +02:00
Johannes Meyer cbc77cb7b2 Web: Implement method getMenu() using Icinga\Web\Menu and deprecate it
refs #2338
2018-04-30 10:30:58 +02:00
Johannes Meyer 096fdfc887 Version.php: Raise version to 2.5.3 2018-04-27 10:23:36 +02:00
Johannes Meyer 23e508ac27 Version.php: Raise version to 2.5.2 2018-04-25 13:02:47 +02:00
Johannes Meyer b14b61d37a Platform: Also check for the sqlsrv extension when checking MSSQL support
refs #3320
2018-04-24 15:56:29 +02:00
Johannes Meyer c566c8bfde
Merge pull request #3400 from Icinga/bugfix/mssql-detection
Platform: Also consider dblib when checking for MSSQL support
2018-04-24 15:46:45 +02:00
Johannes Meyer ecd2320a23 AuthenticationHook: Remove superflous empty line at EOF
Travis complains about this in every PR created after this was introduced..
2018-04-04 11:22:23 +02:00
Davide Bizzarri 8b5fe61996 Add AuthenticationHook
Created AuthenticationHook class with two main methods: onLogin and
onLogout that are called after login and before logout.
2018-03-28 16:18:31 +02:00
Markus Frosch 123a0b8196 Platform: Correct detecting MSSQL Support
PDO Implementation of zf1 builds on module mssql OR pdo_dblib, while dblib is preferred.

Newer implementations would support pdo_sqlsrv, but that is not available with ZF1.
2018-03-27 11:35:26 +02:00
Alexander A. Klimov 4477f33b31 Fix interference between two similar namespaces 2018-03-01 14:01:57 +01:00
Alexander A. Klimov 8e9d385a18 Unify the look of fatal and non-fatal errors
refs #2216
2018-02-07 10:45:20 +01:00
Eric Lippmann 56d28a6c14 Prepare release version 2.5.1 2018-01-22 13:47:41 +01:00
lippserd c18038f166
Merge pull request #3261 from Icinga/bugfix/icingacli-no-setup-module-2705
Make icingacli working without the setup module
2018-01-17 11:58:50 +01:00
Alexander A. Klimov 8cbd506459 Make icingacli working without the setup module
This enables users to install only the icingacli package

refs #2705
2018-01-16 12:21:42 +01:00
lippserd c1497cf1c5
Merge pull request #3143 from Icinga/bugfix/inactive-module-config-tabs-2977
Hide inactive modules' config tabs
2018-01-16 09:18:49 +01:00
Alexander A. Klimov a5e75554ad Don't require module.less
refs #3149
2017-12-15 11:58:54 +01:00
Eric Lippmann e376b137c7 Prepare release version 2.5.0 2017-11-27 16:18:13 +01:00
lippserd 5aa83ea0d9
Merge pull request #3114 from Icinga/feature/support-phar-3113
Modules, Bootstrap: play nice with PHARs
2017-11-27 09:15:34 +01:00
Alexander A. Klimov 6cdad7c5c1 Hide inactive modules' config tabs
refs #2977
2017-11-24 13:40:03 +01:00
Eric Lippmann 8ffa110901 Web: Add icons and descriptions for second level menu items 2017-11-21 22:55:45 +01:00
Thomas Gelf 6e382093f4 Modules, Bootstrap: play nice with PHARs
fixes #3113
2017-11-21 14:15:41 +01:00
Alexander A. Klimov cea52a1b4b Implement ApplicationBootstrap::getStorageDir()
refs #2582
2017-11-16 20:26:49 +01:00
Eric Lippmann af64ca8fc8 Fix that disabled stack straces via user prefs had no effect
Web::setupFrontController() took the user object into account when checking for disabled stacktraces.
But we changed our bootstrap order some time ago so we did not have a user in this method anymore.
Now, Web::setupUser() checks for disabled stacktaces in the user prefs instead.

refs #2595
2017-11-15 17:22:54 +01:00
Alexander A. Klimov cbfbb3a162 Handle enabled, but deleted modules properly
refs #2811
2017-11-08 09:48:58 +01:00
Eric Lippmann 3790fd0819 Bump version to 2.4.2
(cherry picked from commit 13e86b6320)
Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
2017-09-28 14:24:00 +02:00
lippserd e276dfc517 Merge pull request #2951 from Icinga/bugfix/monitored-object-detailview-extension-style-2949
Style monitored objects' detailview extensions as expected
2017-09-22 09:21:31 +02:00
Alexander A. Klimov c2ee3bef06 DetailviewExtensionHook: provide the concrete implementation's module
refs #2949
2017-09-20 14:49:08 +02:00
Uwe Ebel 39838f1606 Add database resource type IBM for DB2
It uses the pdo_ibm driver and Zend Adapter Zend_Db_Adapter_Pdo_Ibm.

Signed-off-by: Markus Frosch <markus.frosch@icinga.com>
2017-09-19 14:32:09 +02:00
lippserd 0e5313d4d1 Merge pull request #2740 from Icinga/feature/emit-log-messages-in-the-webserver-s-log-11652
Emit log messages to the web server log
2017-09-08 15:43:31 +02:00
Alexander A. Klimov b2ab99fd71 Add log writer PhpWriter
refs #11652
2017-09-08 15:39:31 +02:00
Johannes Meyer 3190b7dea3 Revert "Web: Allow to configure whether we'll consider Accept-Language or not"
This reverts commit 87505aff7c.
2017-09-08 12:56:09 +02:00
Johannes Meyer 87505aff7c Web: Allow to configure whether we'll consider Accept-Language or not 2017-09-08 11:55:15 +02:00
Markus Frosch 7da7c0f6c7 Config: Fix cached loading of module config
Since the module copied the array to a local variable, the loaded
Config object never got saved to self::$modules
2017-08-11 08:35:34 +02:00
Eric Lippmann 50971ea8e2 Merge pull request #2725 from Icinga/bugfix/browser-timezone-detection-2716
TimezoneDetect: support also negative timezone offsets
2017-06-02 09:32:59 +02:00
Eric Lippmann 68842f00d8 Fix version 2017-05-03 15:12:07 +02:00
Alexander A. Klimov 1e58e15ac7 Test TimezoneDetect
refs #2716
2017-02-10 15:42:02 +01:00
Johannes Meyer 181e2ef05c Swag: Fix swag (aka a whole bunch of code style issues..) 2017-01-27 14:48:59 +01:00
Eric Lippmann 01daa38eae Fix module permissions for hooks
refs #2686
2017-01-17 14:56:13 +01:00
Eric Lippmann 326574ba54 Fix deprecation notes for Module::registerHook() 2017-01-17 12:30:14 +01:00
Thomas Gelf 361bfc5081 Hook: allow all on CLI
fixes #13691
2016-12-19 21:14:32 +01:00
Eric Lippmann ff71a395d2 Update version to 2.4.0 2016-12-13 12:34:12 +01:00
Eric Lippmann 4eb61c2bcf Revert breaking change in Auth::isAuthenticated()
refs #12580
fixes #13281
2016-12-06 12:41:22 +01:00
Eric Lippmann 39c7451664 Implement announcements
refs #11198
2016-11-29 15:24:34 +01:00
Eric Lippmann 39a5b3f64a Refuse to enable modules prefixed w/ icingaweb2-module-
fixes #10870
2016-11-16 16:21:35 +01:00
Eric Lippmann 1cdef234a1 Revert "Module: Drop deprecated method registerHook and arg $key of method provideHook"
This reverts commit f1a1f41192.

It makes absolutely sense to remove depcreated code, but this removal introduces too many problems while not being really necessary.
Some of our modules and modules written by others still rely on the deprecated code. A upgrade of Icinga Web 2 would break many running systems out there.
Before removing this code we should upgrade our modules and notify the authors of other modules about the deprecation.
Further, we should maintain something like a deprecation info file because nobody reads @deprecated tags.
All of the above will not protect us from systems where modules aren't up to date. We also have to implement a mechanism where it is still possible to disable faulty modules.
2016-11-16 16:17:42 +01:00
Johannes Meyer 7d98025d7d Merge branch 'bugfix/hooks-don-t-respect-module-permissions-12396'
fixes #12396
2016-11-14 09:46:08 +01:00
Johannes Meyer f1a1f41192 Module: Drop deprecated method registerHook and arg $key of method provideHook 2016-11-11 16:15:59 +01:00
Johannes Meyer 5bce7dc9b8 Hook: Check a user's module permission before providing it's hook instances
refs #12396
2016-11-11 16:15:16 +01:00
Alexander A. Klimov 1cd2cfbdc9 Revert "Make hooks respect module permissions"
This reverts commit 4d2e6d2d87.
2016-11-11 11:14:23 +01:00
Alexander A. Klimov 14363e52f4 Revert "Merge branch 'feature/emit-log-messages-in-the-webserver-s-log-11652'"
This reverts commit f27e8c059d.

refs #11652
2016-11-09 11:48:17 +01:00
Eric Lippmann 2b060d9bd4 Challenge API requests only if the controller requires auth
fixes #12580
2016-11-07 10:40:38 +01:00
Alexander A. Klimov f27e8c059d Merge branch 'feature/emit-log-messages-in-the-webserver-s-log-11652'
resolves #11652
2016-11-04 17:15:06 +01:00
Alexander A. Klimov a85d259b0a PhpWriter: replace newlines in the message only if PHP logs to Syslog
refs #11652
2016-11-03 14:06:02 +01:00
Alexander A. Klimov 8952434393 PhpWriter: prefix messages with the app name as in Syslog
refs #11652
2016-11-03 12:35:40 +01:00
Alexander A. Klimov a24999ff7f PhpWriter: throw an exception on logging failure
refs #11652
2016-11-03 12:16:48 +01:00
Alexander A. Klimov ca8e4ea924 Conform to code style guidelines
refs #11652
2016-11-03 12:01:03 +01:00
Alexander A. Klimov 00af3d61b7 LoggingConfigForm: provide less Syslog facilities
refs #11214
2016-10-24 10:43:27 +02:00
Alexander A. Klimov 52e6293b96 Allow to configure the Syslog facility
refs #11214
2016-10-21 17:09:22 +02:00
Alexander A. Klimov 4d2e6d2d87 Make hooks respect module permissions
refs #12396
2016-10-20 18:28:19 +02:00
Alexander A. Klimov a387f0524f Add log writer PhpWriter
refs #11652
2016-10-19 15:29:51 +02:00
Johannes Meyer 7ed3acbbd8 Module: Check a menu item's permission and don't overwrite its label
This allows now totally different values for an item's name and label
and fixes the bug that permissions declared in the configuration.php
were not evaluated for menu items.

fixes #11431
2016-09-26 11:01:26 +02:00
Eric Lippmann 3fdba713ed Merge branch 'bugfix/handle-recoverable-error-10361'
fixes #10361
2016-09-12 08:29:40 +02:00
Eric Lippmann 576640e661 Simplify Version::getGitHead()
refs #11664
2016-09-09 14:19:32 +02:00
Alexander A. Klimov b240e0e6bb Implement Version::getGitHead()
refs #11664
2016-09-01 10:14:14 +02:00
Eric Lippmann e6ec6e05b2 Rename Preferences to My Account
refs #10616
2016-07-21 12:31:10 +02:00
Eric Lippmann fc5ed3feb1 Bump version to 2.3.4 2016-06-23 14:09:55 +02:00
Eric Lippmann d4b9b6d303 Bump version to 2.3.3 2016-06-07 15:15:01 +02:00
Eric Lippmann 54b43efb33 Fix exception if module.info contains newlines that are not part of the module's description
fixes #11831
2016-06-06 16:21:10 +02:00
Alexander A. Klimov 21e4ba5680 Icinga Web 2.3.2 2016-04-28 14:56:31 +02:00
Eric Lippmann fdbcc6af8e Bump version to 2.3.1 2016-04-18 01:10:20 +02:00
Eric Lippmann 773c3cc88e Bump version to 2.3.0 2016-04-13 16:23:38 +02:00
Eric Lippmann 5b17a145f1 Support multiple TTS integrations in the ticket hook
refs #10909
2016-04-06 11:58:01 +02:00
Eric Lippmann 97bedfaa08 lib: Provide ticket pattern class for ticket hooks
refs #10909
2016-04-06 11:18:28 +02:00
Markus Frosch 88d973ac39 Restrict access to application log with 'application/log' permission
fixes #11279
2016-03-02 20:47:37 +01:00
Marius Hein 845a8b78cf Bump version 2016-02-29 22:41:58 +01:00
Alexander A. Klimov 923e902957 Web::bootstrap(): set up the request before setting up the session
refs #11187
2016-02-27 22:17:01 +01:00
Eric Lippmann 88f4f68f29 Merge branch 'bugfix/move-auth-backend-configuration-to-app-config-10309'
fixes #10309
2016-02-27 15:25:11 +01:00
Eric Lippmann e4a0678df0 Load resources from config automatically instead of throwing an exception
fixes #10918
2016-02-26 12:29:30 +01:00
Thomas Gelf 9231746d09 functions.php: failsafe method initialization
This avoids collisions for modules not using the fake bootstrap in our
current tests. Can be removed once we fixed that.
2016-02-25 18:07:29 +01:00
Alexander A. Klimov 1bbb7a3118 Manager::detectEnabledModules(): shorten error message 2016-02-25 17:34:03 +01:00
Thomas Gelf 2ec36667eb Web: change bootstrap order, fixes custom auth 2016-02-18 10:16:22 +01:00
Alexander A. Klimov a3c7a04826 Menu: rename Configuration/Authorization to Configuration/Authentication
refs #10309
2016-02-17 18:56:55 +01:00
Alexander A. Klimov 6c39fb51f8 Menu: move Configuration/Authentication to Configuration/Application/Authentication
refs #10309
2016-02-17 18:23:38 +01:00
Thomas Gelf b63d2ad291 Module: fix multi-instance hook registrations
This fixes the problem that registering the same Hook multiple times
with the provideHook shortcut and no class name kept only one
implementation
2016-02-17 10:30:25 +01:00
Alexander A. Klimov ea9bc6cebd Conform to coding guidelines
refs #11051
2016-02-11 13:29:00 +01:00
Alexander A. Klimov a5924f2ca8 Don't rely on case sensitive usernames in navigation items stored in INI files
refs #11051
2016-02-10 16:22:51 +01:00
Alexander A. Klimov 001c63e376 Don't rely on case sensitive usernames in preferences stored in INI files
refs #11051
2016-02-10 16:21:19 +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 32f87284ad PHP7: Fix MySQL and PostgreSQL PDO extension checks
refs #10251
2016-01-28 13:52:31 +01:00
Eric Lippmann c1f7b2ed2d PHP7: Fix Zend autoload issues
refs #10251
2016-01-27 16:52:32 +01:00
Johannes Meyer 424557f194 StdoutWriter: Rename to StderrWriter 2016-01-21 11:47:11 +01:00
Johannes Meyer 9240d1b4e0 cli: Polish log handling
* Reintroduced Command::$isDebugging, now without typo
* Removed @deprecated from Command::$isVerbose
* Changed default log level to WARNING
* Adjusted --verbose and --debug to activate log level INFO and DEBUG, respectively
2016-01-21 11:29:28 +01:00
Johannes Meyer 790d2a3949 Cli: Do not shift --verbose away, commands may still require it 2016-01-19 15:31:05 +01:00
Johannes Meyer be239b9a22 Cli: Configure logging properly but also offer customisations 2016-01-19 15:07:17 +01:00
Eric Lippmann 353b9da8a5 Bump version to 2.1.2 2015-12-23 14:21:56 +01:00
Eric Lippmann 405b768dc2 Bump version to 2.1.1 2015-12-22 14:50:13 +01:00
Eric Lippmann 720e022bea Merge branch 'feature/use-_env-variables-with-built-in-php-webserver-10488'
resolves #10488
2015-12-21 10:46:05 +01:00
Eric Lippmann 8835552e80 Deprecate Module::registerHook() in favor of Module::provideHook()
refs #9685
2015-12-21 10:30:40 +01:00
Alexander A. Klimov 414a78d532 Use getenv() instead of $_SERVER to get ICINGAWEB_CONFIGDIR
refs #10488
2015-12-18 13:26:38 +01:00
Alexander A. Klimov 643ee7b108 Menu: use target="_self" instead of data-base-target="_self" in logout link
fixes #10330
2015-12-17 18:56:32 +01:00
Alexander A. Klimov 21f7af4b64 Revert "Merge branch 'bugfix/logout-requires-restart-of-browser-10330'"
This reverts commit 94f4c670c1, reversing
changes made to 7d5c15469e.

refs #10330
2015-12-17 18:50:51 +01:00
Alexander A. Klimov 9e2da07eb7 Menu: use target="_self" instead of data-base-target="_self" in logout link
refs #10330
2015-12-17 17:56:13 +01:00
Eric Lippmann 1f467ecfaa Add theme to the stylesheet if set and ...
... revamp interface of LessCompiler and StyleSheet

refs #10705
2015-11-27 16:40:17 +01:00
Eric Lippmann e7262b7d14 Set up logging in EmbeddedWeb 2015-11-27 16:39:19 +01:00
Eric Lippmann 64bed9867f lib: Add Web::getThemes()
refs #10705
2015-11-26 14:49:49 +01:00
Thomas Gelf edcc698e1e Hook: throw exceptions for missing classes
We are otherwise not catching the resulting fatal errors right now
2015-11-17 17:04:04 +01:00
Eric Lippmann fad52e0929 Update version 2015-11-16 15:34:47 +01:00
Thomas Gelf 9156e58329 Web: re-add duplicate ZF plugin loader paths
Not sure why we need both of them, my installation works with both,
one or the other. Re-adding the duplicate one as a related issue
has been reported.

refs #10634
2015-11-15 23:34:44 +01:00
Thomas Gelf 4b9607ad35 Module: we want to load from ProvidedHook
refs #10613
2015-11-13 17:37:02 +01:00
Thomas Gelf 8fa33cebc7 Hook: normalize names also for all() 2015-11-13 17:37:02 +01:00
Thomas Gelf 380f11d9c2 Module: add new provideHook method 2015-11-13 17:37:02 +01:00
Thomas Gelf b7189382fb Module: add getNamespace() method 2015-11-13 17:37:02 +01:00
Thomas Gelf 997c5a0a13 Hook: normalize names 2015-11-13 17:37:02 +01:00
Thomas Gelf b66e4dfdf2 Module: use Application\Hook instead of Web\Hook 2015-11-13 17:37:02 +01:00
Thomas Gelf 54db2c9afa Module::registerHook: use class as default key
refs #9685
2015-11-13 17:37:02 +01:00
Thomas Gelf a24bf32c5b Hook: allow hooks for old modules Web\Hooks
refs #10613
2015-11-13 17:37:02 +01:00
Thomas Gelf 52159c2627 Hook: switch base namespace checks 2015-11-13 17:37:02 +01:00
Thomas Gelf d903f850da Application\Hook: move existing ones, keep compat 2015-11-13 17:37:02 +01:00
Thomas Gelf 576747f792 Application\Hook is the new Hook loader 2015-11-13 17:37:02 +01:00
Johannes Meyer 5fcd65a05a Web: Fix that shared child menu entries were not displayed for non-owners
fixes #10319
2015-11-13 15:28:39 +01:00
Eric Lippmann d5fe0c9610 Merge branch 'feature/dope-layout-5543#2' 2015-11-13 15:21:07 +01:00
Thomas Gelf 74f53725e1 ApplicationBootstrap: phpdoc-deprecate 2015-11-13 11:53:14 +01:00
Thomas Gelf a94662492b ApplicationBootstrap: wipe setupZendAutoloader() 2015-11-13 11:53:14 +01:00
Thomas Gelf d0ce9f86d8 Module: less stat calls, less work to do 2015-11-13 11:53:14 +01:00
Thomas Gelf 99a6bc12a9 ApplicationBootstrap: register global app dir 2015-11-13 11:53:14 +01:00
Thomas Gelf 9270ef6d6f Application\Web: less assistance for class loader 2015-11-13 11:52:13 +01:00
Thomas Gelf 05b7388a18 ClassLoader: completely refactored 2015-11-13 11:52:13 +01:00
Thomas Gelf a1832e1424 Modules/Manager: did we load all enabled modules? 2015-11-13 11:52:13 +01:00
Thomas Gelf f9a0e7dec6 Module: provide getApplicationDir() 2015-11-13 11:52:13 +01:00
Thomas Gelf 7a2824e070 ApplicationBootstrap: syntax 2015-11-13 11:51:41 +01:00
Johannes Meyer 60a951a97d Logger: Add method getLevel()
refs #10567
2015-11-11 09:59:28 +01:00