old_contents: from __future__ import absolute_import
  
  from sentry.api.serializers import Serializer, register
  from sentry.models import User
  from sentry.utils.avatar import get_gravatar_url
  
  
  @register(User)
  class UserSerializer(Serializer):
      def serialize(self, obj, attrs, user):
          d = {
              'id': str(obj.id),
              'name': obj.get_display_name(),
              'isSuperuser': obj.is_superuser,
              'email': obj.email,
              'avatarUrl': get_gravatar_url(obj.email, size=32),
          }
          return d
  
new_contents: from __future__ import absolute_import
  
  from sentry.api.serializers import Serializer, register
  from sentry.models import User
  from sentry.utils.avatar import get_gravatar_url
  
  
  @register(User)
  class UserSerializer(Serializer):
      def serialize(self, obj, attrs, user):
          d = {
              'id': str(obj.id),
              'name': obj.get_display_name(),
              'isSuperuser': obj.is_active_superuser(),
              'email': obj.email,
              'avatarUrl': get_gravatar_url(obj.email, size=32),
          }
          return d
  
subject: Change isSuperuser check to use is_active_superuser