Skip to content

Commit

Permalink
Add Superuser field in user data
Browse files Browse the repository at this point in the history
  • Loading branch information
awaisdar001 committed May 10, 2019
1 parent c28b6be commit 8da42c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auth_backends/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,6 @@ def auth_complete_params(self, state=None):
def user_data(self, access_token, *args, **kwargs):
decoded_access_token = jwt.decode(access_token, verify=False)

keys = list(self.CLAIMS_TO_DETAILS_KEY_MAP.keys()) + ['administrator']
keys = list(self.CLAIMS_TO_DETAILS_KEY_MAP.keys()) + ['administrator', 'superuser']
user_data = {key: decoded_access_token[key] for key in keys if key in decoded_access_token}
return user_data

0 comments on commit 8da42c5

Please sign in to comment.