Skip to content

Commit

Permalink
Merge pull request #33 from prajapati-kaushik/6495-demo-symfony-6-app
Browse files Browse the repository at this point in the history
perf: symfony6 demo app support enhancement #6495
  • Loading branch information
prajapati-kaushik authored Aug 12, 2022
2 parents f55dacd + ea87166 commit 0c5072a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions Services/WikiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,6 @@ public function getWikiPermission(Wiki $wiki)
$wikiRoles = ['readRole' => false, 'writeRole' => false];
$flag = false;

// https://symfony.com/doc/current/security.html#allowing-unsecured-access-i-e-anonymous-users
// unauthenticated/visitor user assign role.
if ($this->authorizationChecker->isGranted('PUBLIC_ACCESS')) {
$wikiRoles['readRole'] = true;
$wikiRoles['writeRole'] = true;

return $wikiRoles;
}

if ($this->authorizationChecker->isGranted('ROLE_SUPERUSER')) {
$wikiRoles['readRole'] = true;
$wikiRoles['writeRole'] = true;
Expand Down

0 comments on commit 0c5072a

Please sign in to comment.