Changeset View
Changeset View
Standalone View
Standalone View
swh/web/auth/mailmap.py
# Copyright (C) 2022 The Software Heritage developers | # Copyright (C) 2022 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU Affero General Public License version 3, or any later version | # License: GNU Affero General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import json | import json | ||||
from typing import Any, Dict | from typing import Any, Dict | ||||
from django.conf.urls import url | |||||
from django.core.paginator import Paginator | from django.core.paginator import Paginator | ||||
from django.db import IntegrityError | from django.db import IntegrityError | ||||
from django.db.models import Q | from django.db.models import Q | ||||
from django.http.request import HttpRequest | from django.http.request import HttpRequest | ||||
from django.http.response import ( | from django.http.response import ( | ||||
HttpResponse, | HttpResponse, | ||||
HttpResponseBadRequest, | HttpResponseBadRequest, | ||||
HttpResponseNotFound, | HttpResponseNotFound, | ||||
JsonResponse, | JsonResponse, | ||||
) | ) | ||||
from django.urls import re_path as url | |||||
from rest_framework import serializers | from rest_framework import serializers | ||||
from rest_framework.decorators import api_view | from rest_framework.decorators import api_view | ||||
from rest_framework.request import Request | from rest_framework.request import Request | ||||
from rest_framework.response import Response | from rest_framework.response import Response | ||||
from swh.web.auth.models import UserMailmap, UserMailmapEvent | from swh.web.auth.models import UserMailmap, UserMailmapEvent | ||||
from swh.web.auth.utils import ( | from swh.web.auth.utils import ( | ||||
MAILMAP_ADMIN_PERMISSION, | MAILMAP_ADMIN_PERMISSION, | ||||
▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines |