Skip to content

Commit 601753a

Browse files
committed
Drop user, users, usergroup and usergroups endpoints
1 parent 555f141 commit 601753a

File tree

7 files changed

+8
-134
lines changed

7 files changed

+8
-134
lines changed

application/controllers/UserController.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

application/controllers/UsergroupController.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

application/controllers/UsergroupsController.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

application/controllers/UsersController.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

configuration.php

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,7 @@
373373
]);
374374
}
375375

376-
if (
377-
! array_key_exists('usergroups', $routeDenylist) // TODO: Remove with 1.3, compat only
378-
&& ! array_key_exists('contactgroups', $routeDenylist)
379-
) {
376+
if (! array_key_exists('contactgroups', $routeDenylist)) {
380377
$overviewSection->add(N_('Contact Groups'), [
381378
'description' => $this->translate('List contact groups'),
382379
'url' => 'icingadb/contactgroups',
@@ -385,10 +382,7 @@
385382
]);
386383
}
387384

388-
if (
389-
! array_key_exists('users', $routeDenylist) // TODO: Remove with 1.3, compat only
390-
&& ! array_key_exists('contacts', $routeDenylist)
391-
) {
385+
if (! array_key_exists('contacts', $routeDenylist)) {
392386
$overviewSection->add(N_('Contacts'), [
393387
'description' => $this->translate('List contacts'),
394388
'url' => 'icingadb/contacts',
@@ -505,10 +499,7 @@
505499
]);
506500
}
507501

508-
if (
509-
! array_key_exists('usergroups', $routeDenylist) // TODO: Remove with 1.3, compat only
510-
&& ! array_key_exists('contactgroups', $routeDenylist)
511-
) {
502+
if (! array_key_exists('contactgroups', $routeDenylist)) {
512503
$section->add(N_('Contact Groups'), [
513504
'url' => 'icingadb/contactgroups',
514505
'priority' => 70,
@@ -517,10 +508,7 @@
517508
]);
518509
}
519510

520-
if (
521-
! array_key_exists('users', $routeDenylist) // TODO: Remove with 1.3, compat only
522-
&& ! array_key_exists('contacts', $routeDenylist)
523-
) {
511+
if (! array_key_exists('contacts', $routeDenylist)) {
524512
$section->add(N_('Contacts'), [
525513
'url' => 'icingadb/contacts',
526514
'priority' => 80,

doc/05-Upgrading.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ If you are upgrading across multiple versions, make sure to follow the steps for
77

88
**Removed Features**
99

10+
* The routes `users`, `user`, `usergroup` and `usergroups` have been removed.
11+
* Accessing these routes will result in a 404 error.
12+
* The corresponding values for `icingadb/denylist/routes` have no effect anymore.
13+
* The alternatives (`contacts`, `contact` , `contactgroup` and `contactgroups`) have been available since v1.2.
1014
* The migration widget in the top right has been removed. If you have not adjusted your navigation items,
1115
dashboards and bookmarks to support the new filter syntax, you will need to do so manually now (see [Upgrading to
1216
Icinga DB Web v1.1](#upgrading-to-icinga-db-web-v11) for details).

library/Icingadb/Common/Auth.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ public function isPermittedRoute(string $name): bool
4343
}, $this->getAuth()->getRestrictions('icingadb/denylist/routes'))));
4444

4545
if (! array_key_exists($name, $routeDenylist)) {
46-
if ($name === 'contacts' && array_key_exists('users', $routeDenylist)) {
47-
return false; // TODO: Remove with 1.3, compat only
48-
} elseif ($name === 'contactgroups' && array_key_exists('usergroups', $routeDenylist)) {
49-
return false; // TODO: Remove with 1.3, compat only
50-
}
51-
5246
return true;
5347
}
5448

0 commit comments

Comments
 (0)