Skip to content

Commit 38765b4

Browse files
committed
Merge remote-tracking branch 'origin/MC-33314' into 2.4.1-develop-pr25
2 parents 15990d2 + 420603f commit 38765b4

File tree

2 files changed

+36
-1
lines changed
  • app/code/Magento/Analytics/Controller/Adminhtml/Reports
  • dev/tests/integration/testsuite/Magento/Analytics/Controller/Adminhtml/Reports

2 files changed

+36
-1
lines changed

app/code/Magento/Analytics/Controller/Adminhtml/Reports/Show.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Show extends Action implements HttpGetActionInterface
2727
/**
2828
* @inheritdoc
2929
*/
30-
const ADMIN_RESOURCE = 'Magento_Analytics::analytics_settings';
30+
const ADMIN_RESOURCE = 'Magento_Analytics::advanced_reporting';
3131

3232
/**
3333
* @param Context $context
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Analytics\Controller\Adminhtml\Reports;
9+
10+
use Magento\TestFramework\TestCase\AbstractBackendController;
11+
12+
/**
13+
* @magentoAppArea adminhtml
14+
*/
15+
class ShowTest extends AbstractBackendController
16+
{
17+
private const REPORT_HOST = 'advancedreporting.rjmetrics.com';
18+
/**
19+
* @inheritDoc
20+
*/
21+
protected $resource = 'Magento_Analytics::advanced_reporting';
22+
/**
23+
* @inheritDoc
24+
*/
25+
protected $uri = 'backend/analytics/reports/show';
26+
/**
27+
* @inheritDoc
28+
*/
29+
public function testAclHasAccess()
30+
{
31+
parent::testAclHasAccess();
32+
$this->assertSame(302, $this->getResponse()->getHttpResponseCode());
33+
$this->assertSame(self::REPORT_HOST, $this->getResponse()->getHeader('location')->uri()->getHost());
34+
}
35+
}

0 commit comments

Comments
 (0)