add permission layer for admins for backend API
This commit is contained in:
parent
62187e0b29
commit
907e0ecaab
4 changed files with 33 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ def hydra_callback():
|
|||
identity = i
|
||||
|
||||
access_token = create_access_token(
|
||||
identity=token, expires_delta=timedelta(days=365)
|
||||
identity=token, expires_delta=timedelta(days=365), additional_claims={"user_id": identity["id"]}
|
||||
)
|
||||
|
||||
apps = App.query.all()
|
||||
|
|
|
|||
Reference in a new issue