Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathieu Loiseau
MagicWord
Commits
0b95997b
Commit
0b95997b
authored
Jan 17, 2019
by
Arnaud Bey
Browse files
admin can access others' game editor
parent
e1a70f73
Changes
1
Show whitespace changes
Inline
Side-by-side
application/src/MagicWordBundle/Manager/UserManager.php
View file @
0b95997b
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment