Skip to content

Commit 9a20186

Browse files
committed
Block access to notifications according to the test
1 parent f0c1e73 commit 9a20186

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/Middleware/AuthenticationMiddleware.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class AuthenticationMiddleware implements MiddlewareInterface
3434
'data_tables',
3535
],
3636
'Incidents' => ['view'],
37+
'Notifications' => '*',
3738
];
3839

3940
/**

tests/TestCase/Controller/NotificationsControllerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function setUp(): void
4444
public function testIndex(): void
4545
{
4646
$this->get('notifications');
47+
$this->assertResponseCode(307);
4748

4849
// 'read_only' users are not allowed to view notifications page
4950
$this->assertRedirect(['controller' => '', 'action' => 'index']);

0 commit comments

Comments
 (0)