Skip to content

Commit

Permalink
feat: remove scopes temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
julienhouyet committed Mar 7, 2024
1 parent 57a317c commit 1148c8c
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,16 @@ public function getUserIdentifier(): string
*/
public function getRoles(): array
{
if (null === $this->accessTokenScopes) {
// logged in via the full user mechanism
$roles = $this->roles;
$roles[] = 'ROLE_FULL_USER';
} else {
$roles = $this->accessTokenScopes;
}
$roles = $this->roles;

// Scopes at configure later
// if (null === $this->accessTokenScopes) {
// // logged in via the full user mechanism
// $roles = $this->roles;
// $roles[] = 'ROLE_FULL_USER';
// } else {
// $roles = $this->accessTokenScopes;
// }

// guarantee every user at least has ROLE_USER
$roles[] = 'ROLE_USER';
Expand Down

0 comments on commit 1148c8c

Please # to comment.