Django Rest Framework

Hey guys. How to get current superuser in serializer?

You can get current request user like this.

self.context['request'].user

You can then check whether the user is superuser(admin) or not.

1 Like