Fixed restricted user unable to view his profile
This commit is contained in:
parent
7a15a590ed
commit
3ae01ee4e8
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,8 @@ final class UserController extends AbstractController
|
|||
|
||||
public function getByNameOrEmail($userNameOrEmail)
|
||||
{
|
||||
$this->privilegeService->assertPrivilege(Privilege::VIEW_USERS);
|
||||
if (!$this->privilegeService->isLoggedIn($userNameOrEmail))
|
||||
$this->privilegeService->assertPrivilege(Privilege::VIEW_USERS);
|
||||
$user = $this->userService->getByNameOrEmail($userNameOrEmail);
|
||||
return $this->userViewProxy->fromEntity($user);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue