Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre-T authored Jul 2, 2021
1 parent aa5cdcd commit 6175a1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ use Symfony\Component\Security\Core\User\UserInterface;
// add the interface
class User implements BannedInterface, UserInterface
{
//Add a private method
//Add a private property
private bool $banned = false;

//Your getter can be improved to avoid that an admin ban another admin.
//Your getter can be improved to avoid that an admin bans another one.
public function isBanned(): bool
{
//In this example admin cannot be banned
//In this example admins cannot be banned
return $this->isBanned() and !in_array('ROLE_ADMIN', $this->getRoles());
}

Expand All @@ -88,7 +88,7 @@ class User implements BannedInterface, UserInterface
```
Step2, configure the security layer:

If you don't use flex, add the UserChecker service to your security config:
Add the UserChecker service to your security config:

```yaml
# config/security.yaml
Expand Down

0 comments on commit 6175a1b

Please sign in to comment.