'Best way to provide admin role from Django REST to ReactJS
The default django user model has a is_superuser field. I would like to use this field to conditionally render components in react, i.e. get something like this:
{isAdmin &&
<SomeReactComponent/>
}
What is the best way to do this? I have authentication through JWT-Tokens (SimpleJWT). Can I somehow use them for this purpose?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
