Skip to content

Commit eada8ab

Browse files
authored
[PWA-356] Magento Admin Warning Message (#26)
* Override filesystem check to be compatible with UPWARD * Newline EOF
1 parent f9de4ca commit eada8ab

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

Model/System/Message/Security.php

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\UpwardConnector\Model\System\Message;
8+
9+
use Magento\Store\Model\Store;
10+
11+
class Security implements \Magento\Framework\Notification\MessageInterface
12+
{
13+
/**
14+
* @return string
15+
*/
16+
public function getIdentity()
17+
{
18+
return 'security';
19+
}
20+
21+
/**
22+
* @return bool
23+
*/
24+
public function isDisplayed()
25+
{
26+
return false;
27+
}
28+
29+
/**
30+
* @return \Magento\Framework\Phrase
31+
*/
32+
public function getText()
33+
{
34+
return __('Security check not applicable to UPWARD');
35+
}
36+
37+
/**
38+
* @return int
39+
*/
40+
public function getSeverity()
41+
{
42+
return \Magento\Framework\Notification\MessageInterface::SEVERITY_NOTICE;
43+
}
44+
}

etc/adminhtml/di.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
10+
<type name="Magento\Framework\Notification\MessageList">
11+
<arguments>
12+
<argument name="messages" xsi:type="array">
13+
<item name="security" xsi:type="string">Magento\UpwardConnector\Model\System\Message\Security</item>
14+
</argument>
15+
</arguments>
16+
</type>
17+
</config>

0 commit comments

Comments
 (0)