-
`
` |
Beta Was this translation helpful? Give feedback.
Answered by
wnesbv
Mar 23, 2022
Replies: 2 comments 12 replies
-
Hey, Then maybe something like this? class AuthModelAdmin(ModelAdmin):
def is_accessible(
self,
request: Request,
) -> bool:
token = request.headers.get("Authentication")
# Calling whatever function to handle the auth
user = get_user(db, token)
if not user.admin:
return False
return True Does that make sense? |
Beta Was this translation helpful? Give feedback.
11 replies
-
I've decided everything. Two offline authorizations |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
wnesbv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've decided everything. Two offline authorizations