Skip to content

Commit

Permalink
roles: changed need creation by role name to id
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandromumo committed Jul 27, 2023
1 parent de1532d commit 4b08d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flask_security/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def _on_identity_loaded(sender, identity):
identity.provides.add(UserNeed(current_user.id))

for role in getattr(current_user, 'roles', []):
identity.provides.add(RoleNeed(role.name))
identity.provides.add(RoleNeed(role.id))

identity.user = current_user

Expand Down

0 comments on commit 4b08d17

Please sign in to comment.