Ejemplo n.º 1
0
 public function __invoke($id = null)
 {
     if ($id) {
         return $this->getEntity($id);
     }
     return $this->authenticationService->getAccountEntity();
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 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()]);
 }
Ejemplo n.º 4
0
 public function __invoke()
 {
     return $this->authService->getAccountEntity();
 }