Commit 0b95997b authored by Arnaud Bey's avatar Arnaud Bey
Browse files

admin can access others' game editor

parent e1a70f73
......@@ -209,7 +209,7 @@ class UserManager
public function isGranted(Massive $massive)
{
$currentUser = $this->tokenStorage->getToken()->getUser();
if ($massive->getAuthor() !== $currentUser) {
if ($massive->getAuthor() !== $currentUser && !$currentUser->hasRole('ROLE_ADMIN')) {
$this->session->getFlashBag()->add('warning', 'Seul le créateur de la partie a accès à cette page');
return false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment