Language: Python
Label: safe
CWE: NVD-CWE-Other \u2014 Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.

Code:
    def create(self, request, *args, **kwargs):
        if User.objects.filter(is_superuser=True).exists() and not request.user.is_superuser:
            return Response(status=status.HTTP_401_UNAUTHORIZED)
        return super(UserViewSet, self).create(request, *args, **kwargs)