Skip to content

Commit

Permalink
BaseEndpoint: Add getter for user Authorizator.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek authored May 18, 2020
1 parent 7c3d74c commit fe449e8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Endpoint/BaseEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Nette\Caching\IStorage;
use Nette\DI\Container;
use Nette\Localization\ITranslator;
use Nette\Security\IAuthorizator;
use Nette\Security\IIdentity;
use Nette\Security\User;
use Nette\SmartObject;
Expand Down Expand Up @@ -300,6 +301,15 @@ final public function getUserEntity(): ?IIdentity
}


/**
* @return IAuthorizator
*/
final public function getAuthorizator(): IAuthorizator
{
return $this->getUser()->getAuthorizator();
}


/**
* @param string $dest
* @param mixed[] $params
Expand Down

0 comments on commit fe449e8

Please sign in to comment.