示例#1
0
文件: Account.php 项目: zource/zource
 public function __invoke($id = null)
 {
     if ($id) {
         return $this->getEntity($id);
     }
     return $this->authenticationService->getAccountEntity();
 }
示例#2
0
文件: Access.php 项目: zource/zource
 public function __invoke($permission, $assert = null, AccountInterface $account = null)
 {
     if ($account === null) {
         $account = $this->authenticationService->getAccountEntity();
     }
     //$groups = $account->getGroups();
     //var_dump($groups->count());
     //exit;
     return $this->authorizationService->isGranted('account-' . $account->getId()->toString(), $permission, $assert);
 }
示例#3
0
 public function indexAction()
 {
     $account = $this->authenticationService->getAccountEntity();
     return new ViewModel(['account' => $account, 'remoteAddressLookup' => $this->sessionService->getRemoteAddressLookup(), 'sessions' => $this->sessionService->getForAccount($account), 'userAgentParser' => $this->sessionService->getUserAgentParser()]);
 }
示例#4
0
文件: Account.php 项目: zource/zource
 public function __invoke()
 {
     return $this->authService->getAccountEntity();
 }