Commit Graph

4359 Commits

Author SHA1 Message Date
Johannes Meyer 81a3be74f3 Dashboard: Don't merge already existing dashlets
fixes #5203
2024-08-13 11:37:12 +02:00
Johannes Meyer d06ce98d2f IniWriter: Avoid deprecation notice upon write errors 2024-08-13 11:36:31 +02:00
Sukhwinder Dhillon c27ca26dad LdapConnection: Access array key only if its set
The key `$controlsReturned[LDAP_CONTROL_PAGEDRESULTS]` can be undefined
when `$controls[LDAP_CONTROL_PAGEDRESULTS]['iscritical']` is set to false.
2024-08-07 14:05:35 +02:00
Johannes Meyer 4c3139224e Csp: Include `script-src 'self';
fixes #5180
2024-08-07 11:39:58 +02:00
Johannes Meyer b3bffa7832 Tab(s): Fix doc types 2024-04-15 13:02:10 +02:00
Johannes Meyer a734aca11b Controller: Fix doc of httpNotFound and httpBadRequest 2024-04-15 13:02:10 +02:00
Johannes Meyer d6881e0273 ConfigObject: Document generics 2024-02-15 14:13:48 +01:00
Sukhwinder Dhillon 804f28ea8a CommentParser: Add var type hint 2024-02-09 14:05:22 +01:00
Sukhwinder Dhillon 31e3455c79 LdapConnection: Fix ldap return type issues
ldap_connect() in php >= 8.1 returns `LDAP\Connection` instead of `resource` and all ldap_*() methods expects the returned type. But function defined return type and $ds type confuses phpstan, so i removed the hardcoded type hint.
2024-02-09 14:05:22 +01:00
Johannes Meyer b23cbd796f Raise version to 2.12.1 2023-11-15 12:22:46 +01:00
Alexander Aleksandrovič Klimov d3f64604a3
Support PHP 8.3 (#5137)
fixes #5136
2023-11-14 11:22:54 +01:00
Johannes Meyer a2c143d75e Response: Only preserve `showCompact` for explicit redirects
In case of a `__SELF__` redirect, the client should still have
the parameter in the location and its preserved this way then.
2023-10-27 10:15:47 +02:00
Yonas Habteab bcdad8c9b3 MigrationManager: Enhance how pgsql privileges are checked
For mysql it's just enough to check whether the privileges are granted
at database or table label, but for PostgreSQL it's necessary that the
privileges are granted at database and at table level.
2023-10-26 17:07:17 +02:00
Yonas Habteab a99f685d15 Add missing pgsql `USAGE` privilege 2023-10-26 17:07:17 +02:00
Johannes Meyer e5f6fc276a ActionController: Always reload window when redirecting to the login
This ensures that, if CSP is enabled, the newly created token on the
login is accepted by the browser. A small, but IMHO desired, side
effect is that the login now always appears in the default theme.

fixes #5126
2023-09-28 10:35:18 +02:00
Johannes Meyer 21d631ad7e Raise version to 2.12.0 2023-09-21 16:35:31 +02:00
Yonas Habteab c3eef5f607 DbMigrationHook: Pad matching groups to the desired length before using them 2023-09-20 15:35:39 +02:00
Johannes Meyer 9c6d930e17 MigrationManager: Also check table privileges 2023-09-19 14:37:55 +02:00
Yonas Habteab 167ff54947 Enhance logging 2023-09-19 14:37:55 +02:00
Yonas Habteab 47b214ee1b Use `PDO::fetchColumn()` where applicable 2023-09-19 14:37:55 +02:00
Yonas Habteab 2505e79a2d DbMigration: Check for mysql collation name whether to check 2.11 is migrated 2023-09-19 14:37:55 +02:00
Yonas Habteab dc738ec4ce `DbMigrationHook`: Adjust regex pattern & add missing argument docs 2023-09-19 14:37:55 +02:00
Yonas Habteab 96a6321569 DbMigration: Adjust usage of `Database::getDb()` 2023-09-19 14:37:55 +02:00
Yonas Habteab fac3855a86 DbMigrationStep: Don't cache sql statements unnecessarily 2023-09-19 14:37:55 +02:00
Yonas Habteab 26cae8b882 Rename `MigrationHook` -> `DbMigrationHook` 2023-09-19 14:37:55 +02:00
Yonas Habteab ce89d4a7cb Rename `Common\DbMigration` -> `DbMigrationStep` 2023-09-19 14:37:55 +02:00
Yonas Habteab 2657f032dc Allow to automatically fix missing grants & elevalte database users
Co-authored-by: Johannes Meyer
2023-09-19 14:37:55 +02:00
Yonas Habteab 12bc95099e Don't raise unhandled exceptions in menu context 2023-09-19 14:37:55 +02:00
Yonas Habteab ac24c6d34b Don't traverse schema query if the last successfully migrated version is found 2023-09-19 14:37:55 +02:00
Yonas Habteab 73b1041816 Fix phpstan claims & php code sniffer errors 2023-09-19 14:37:55 +02:00
Yonas Habteab a167b6d21a Rename migration list item classes 2023-09-19 14:37:55 +02:00
Yonas Habteab 821a6812ae Use `EmptyState(Bar)` classes where applicable 2023-09-19 14:37:55 +02:00
Yonas Habteab 13569a34b7 Check explicitly for `false` before raising an unknown error 2023-09-19 14:37:55 +02:00
Yonas Habteab 4b2784f85e Use `Icinga Web` as a component name 2023-09-19 14:37:55 +02:00
Yonas Habteab 2944ceaa52 Rename `getSchemaQueryFor()` & drop `$version` param 2023-09-19 14:37:55 +02:00
Florian Strohmaier 7e313c921a MigrationListItemMinimal: Customize markup for styling 2023-09-19 14:37:55 +02:00
Yonas Habteab a00f094e10 Add extra collapsible container around error section 2023-09-19 14:37:55 +02:00
Yonas Habteab ad02431bd1 Add extra `class` to outer item lists & render subject header in the error box 2023-09-19 14:37:55 +02:00
Yonas Habteab 192a21b668 Don't use `strong` tag to highlight unselectable items 2023-09-19 14:37:55 +02:00
Yonas Habteab fb33a2097a Defferentiate migrations with no provided descriptions 2023-09-19 14:37:55 +02:00
Yonas Habteab ce012dcdb2 Hook: Don't abort loading remaining hooks due to one broken hook
`Hook::all()` shouldn't abort loading the remaining hooks when one of
the provided hook is broken.
2023-09-19 14:37:55 +02:00
Yonas Habteab 15792fb59a Provide `DbMigration` hook & register when bootstrapping 2023-09-19 14:37:55 +02:00
Yonas Habteab 1da5487066 Introduce `MigrationsController` & add pending migrations list in about view 2023-09-19 14:37:55 +02:00
Yonas Habteab 85b63dd067 Introduce migration `ListItem` & `ItemList` classes 2023-09-19 14:37:55 +02:00
Yonas Habteab 81c9e5cfc5 Introduce `MigrationManager` class 2023-09-19 14:37:55 +02:00
Yonas Habteab babc59437f Introduce base `MigrationHook` class & helpers 2023-09-19 14:37:54 +02:00
Yonas Habteab 21bde13274 Introduce database models required by migration hooks 2023-09-19 14:37:54 +02:00
Yonas Habteab ab96f66e72 Add `never` return type to redirect methods 2023-09-07 15:33:39 +02:00
Johannes Meyer 36d4e6db29 Response: Fix backwards compatibilty for `__CLOSE__`
If the redirect target changes, `__CLOSE__` has no effect

fixes #5081
2023-09-07 13:51:55 +02:00
Eric Lippmann b693369412 Fix class in `Platform::hasOracleSupport()` 2023-09-07 08:51:22 +02:00