File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
app/code/Magento/Ui/Controller/Adminhtml/Index Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,18 @@ public function execute()
86
86
87
87
$ contentType = $ this ->contentTypeResolver ->resolve ($ component ->getContext ());
88
88
$ this ->getResponse ()->setHeader ('Content-Type ' , $ contentType , true );
89
+ }else {
90
+ /** @var \Magento\Framework\Controller\Result\Json $resultJson */
91
+ $ resultJson = $ this ->resultJsonFactory ->create ();
92
+ $ resultJson ->setStatusHeader (
93
+ \Zend \Http \Response::STATUS_CODE_403 ,
94
+ \Zend \Http \AbstractMessage::VERSION_11 ,
95
+ 'Forbidden '
96
+ );
97
+ return $ resultJson ->setData ([
98
+ 'error ' => $ this ->escaper ->escapeHtml ('Forbidden ' ),
99
+ 'errorcode ' => 403 ]
100
+ );
89
101
}
90
102
} catch (\Magento \Framework \Exception \LocalizedException $ e ) {
91
103
$ this ->logger ->critical ($ e );
You can’t perform that action at this time.
0 commit comments