Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Denied.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Backend\Block;
7 
13 {
17  protected $_authSession;
18 
24  public function __construct(
25  \Magento\Backend\Block\Template\Context $context,
26  \Magento\Backend\Model\Auth\Session $authSession,
27  array $data = []
28  ) {
29  $this->_authSession = $authSession;
30  parent::__construct($context, $data);
31  }
32 
36  public function hasAvailableResources()
37  {
38  $user = $this->_authSession->getUser();
39  if ($user && $user->getHasAvailableResources()) {
40  return true;
41  }
42  return false;
43  }
44 }
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Backend\Model\Auth\Session $authSession, array $data=[])
Definition: Denied.php:24
$user
Definition: dummy_user.php:13