Fixed restricted user unable to view his profile

This commit is contained in:
Marcin Kurczewski 2014-10-12 11:45:42 +02:00
parent 7a15a590ed
commit 3ae01ee4e8

View file

@ -55,6 +55,7 @@ final class UserController extends AbstractController
public function getByNameOrEmail($userNameOrEmail)
{
if (!$this->privilegeService->isLoggedIn($userNameOrEmail))
$this->privilegeService->assertPrivilege(Privilege::VIEW_USERS);
$user = $this->userService->getByNameOrEmail($userNameOrEmail);
return $this->userViewProxy->fromEntity($user);