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